* ext/openssl/ossl_x509ext.c (ossl_x509ext_initialize): fix for
initialization of r18168. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
86e45042cb
commit
34e157478b
@ -1,3 +1,8 @@
|
|||||||
|
Sat Aug 30 14:58:32 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* ext/openssl/ossl_x509ext.c (ossl_x509ext_initialize): fix for
|
||||||
|
initialization of r18168.
|
||||||
|
|
||||||
Sat Aug 30 14:47:30 2008 Tanaka Akira <akr@fsij.org>
|
Sat Aug 30 14:47:30 2008 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* ext/dl/mkcallback.rb: fix continuation line detection.
|
* ext/dl/mkcallback.rb: fix continuation line detection.
|
||||||
|
@ -275,14 +275,16 @@ ossl_x509ext_initialize(int argc, VALUE *argv, VALUE self)
|
|||||||
{
|
{
|
||||||
VALUE oid, value, critical;
|
VALUE oid, value, critical;
|
||||||
const unsigned char *p;
|
const unsigned char *p;
|
||||||
X509_EXTENSION *ext, *x = DATA_PTR(self);
|
X509_EXTENSION *ext, *x;
|
||||||
|
|
||||||
GetX509Ext(self, ext);
|
GetX509Ext(self, ext);
|
||||||
if(rb_scan_args(argc, argv, "12", &oid, &value, &critical) == 1){
|
if(rb_scan_args(argc, argv, "12", &oid, &value, &critical) == 1){
|
||||||
oid = ossl_to_der_if_possible(oid);
|
oid = ossl_to_der_if_possible(oid);
|
||||||
StringValue(oid);
|
StringValue(oid);
|
||||||
p = (unsigned char *)RSTRING_PTR(oid);
|
p = (unsigned char *)RSTRING_PTR(oid);
|
||||||
if(!d2i_X509_EXTENSION(&x, &p, RSTRING_LEN(oid)) && (DATA_PTR(self) = x, 1))
|
x = d2i_X509_EXTENSION(&ext, &p, RSTRING_LEN(oid));
|
||||||
|
DATA_PTR(self) = ext;
|
||||||
|
if(!x)
|
||||||
ossl_raise(eX509ExtError, NULL);
|
ossl_raise(eX509ExtError, NULL);
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user