summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorgotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-11-15 13:19:17 +0000
committergotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-11-15 13:19:17 +0000
commitabbffef10ccd7bb0b2022bcc73afc51c86bc49c4 (patch)
treefc8aed2888e9900bc3846fe6a4bd4d39b6731269 /ext
parentff509230953bb8115192c3b4c5e75647885f9176 (diff)
* /ext/openssl/ossl_x509ext.c (ossl_x509extfactory_create_ext):
refine error message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/openssl/ossl_x509ext.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/openssl/ossl_x509ext.c b/ext/openssl/ossl_x509ext.c
index d9ec846..f0ce068 100644
--- a/ext/openssl/ossl_x509ext.c
+++ b/ext/openssl/ossl_x509ext.c
@@ -223,11 +223,14 @@ ossl_x509extfactory_create_ext(int argc, VALUE *argv, VALUE self)
nid = OBJ_ln2nid(RSTRING(oid)->ptr);
if(!nid) nid = OBJ_sn2nid(RSTRING(oid)->ptr);
- if(!nid) ossl_raise(eX509ExtError, NULL);
+ if(!nid) ossl_raise(eX509ExtError, "unknown OID `%s'", RSTRING(oid)->ptr);
valstr = rb_str_new2(RTEST(critical) ? "critical," : "");
rb_str_append(valstr, value);
ext = X509V3_EXT_conf_nid(NULL, ctx, nid, RSTRING(valstr)->ptr);
- if (!ext) ossl_raise(eX509ExtError, NULL);
+ if (!ext){
+ ossl_raise(eX509ExtError, "%s = %s",
+ RSTRING(oid)->ptr, RSTRING(value)->ptr);
+ }
WrapX509Ext(cX509Ext, obj, ext);
return obj;