mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/openssl/ossl_x509attr.c (ossl_x509attr_initialize): fix for
initialization of r18168. * ext/openssl/ossl_ocsp.c (ossl_ocspreq_initialize): ditto. * ext/openssl/ossl_x509ext.c (ossl_x509ext_initialize): ditto. * ext/openssl/ossl_x509name.c (ossl_x509name_initialize): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@18943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3c118f0f04
commit
337f8efb63
6 changed files with 30 additions and 11 deletions
|
@ -137,10 +137,12 @@ ossl_x509name_initialize(int argc, VALUE *argv, VALUE self)
|
|||
else{
|
||||
const unsigned char *p;
|
||||
VALUE str = ossl_to_der_if_possible(arg);
|
||||
X509_NAME *x = DATA_PTR(self);
|
||||
X509_NAME *x;
|
||||
StringValue(str);
|
||||
p = (unsigned char *)RSTRING_PTR(str);
|
||||
if(!d2i_X509_NAME(&x, &p, RSTRING_LEN(str)) && (DATA_PTR(self) = x, 1)){
|
||||
x = d2i_X509_NAME(&name, &p, RSTRING_LEN(str));
|
||||
DATA_PTR(self) = name;
|
||||
if(!x){
|
||||
ossl_raise(eX509NameError, NULL);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue