diff options
| author | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-11-15 13:19:17 +0000 |
|---|---|---|
| committer | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-11-15 13:19:17 +0000 |
| commit | b50034ecec8e7b869d9290acc575518d58552b74 (patch) | |
| tree | fc8aed2888e9900bc3846fe6a4bd4d39b6731269 | |
| parent | 6173f55fb29ed625c278338a0914e01059a66ed6 (diff) | |
| download | ruby-b50034ecec8e7b869d9290acc575518d58552b74.tar.gz ruby-b50034ecec8e7b869d9290acc575518d58552b74.tar.xz ruby-b50034ecec8e7b869d9290acc575518d58552b74.zip | |
* /ext/openssl/ossl_x509ext.c (ossl_x509extfactory_create_ext):
refine error message.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | ext/openssl/ossl_x509ext.c | 7 |
2 files changed, 10 insertions, 2 deletions
@@ -1,3 +1,8 @@ +Sat Nov 15 22:16:42 2003 GOTOU Yuuzou <gotoyuzo@notwork.org> + + * /ext/openssl/ossl_x509ext.c (ossl_x509extfactory_create_ext): + refine error message. + Sat Nov 15 10:05:40 2003 Tanaka Akira <akr@m17n.org> * lib/open-uri.rb (OpenURI.open_loop, OpenURI::HTTP#proxy_open): diff --git a/ext/openssl/ossl_x509ext.c b/ext/openssl/ossl_x509ext.c index d9ec846ac..f0ce068d6 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; |
