1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* /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
This commit is contained in:
gotoyuzo 2003-11-15 13:19:17 +00:00
parent ff50923095
commit abbffef10c
2 changed files with 10 additions and 2 deletions

View file

@ -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):

View file

@ -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;