diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-29 03:19:15 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-29 03:19:15 +0000 |
commit | 379fa42f6db7c7f88cc2eddde8326441086e7aed (patch) | |
tree | 6151bd088438c84c3474f6930f254d7627e2422f /ext/openssl/ossl_x509name.c | |
parent | 7fc16c237724a5f4377cea47e3434f53d42af5f4 (diff) | |
download | ruby-379fa42f6db7c7f88cc2eddde8326441086e7aed.tar.gz |
* 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_x509name.c (ossl_x509name_initialize): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/ossl_x509name.c')
-rw-r--r-- | ext/openssl/ossl_x509name.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/openssl/ossl_x509name.c b/ext/openssl/ossl_x509name.c index 58e2487485..fd8e329a85 100644 --- a/ext/openssl/ossl_x509name.c +++ b/ext/openssl/ossl_x509name.c @@ -137,13 +137,14 @@ 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); } - DATA_PTR(self) = x; } } |