From ef5ce7029d1cc25ca9026f55bcc5d37253dd6480 Mon Sep 17 00:00:00 2001 From: gotoyuzo Date: Mon, 23 Aug 2004 23:59:44 +0000 Subject: * ext/openssl/ossl_x509attr.c (ossl_x509attr_initialize): d2i functions may replace the pointer indicated by the first argument. * 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/trunk@6810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/openssl/ossl_x509ext.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ext/openssl/ossl_x509ext.c') diff --git a/ext/openssl/ossl_x509ext.c b/ext/openssl/ossl_x509ext.c index f0ce068d6b..57e005489a 100644 --- a/ext/openssl/ossl_x509ext.c +++ b/ext/openssl/ossl_x509ext.c @@ -260,13 +260,13 @@ ossl_x509ext_initialize(int argc, VALUE *argv, VALUE self) unsigned char *p; X509_EXTENSION *ext; + GetX509Ext(self, ext); if(rb_scan_args(argc, argv, "12", &oid, &value, &critical) == 1){ - /* evaluate oid as a DER string */ oid = ossl_to_der_if_possible(oid); StringValue(oid); - GetX509Ext(self, ext); p = RSTRING(oid)->ptr; - if(!d2i_X509_EXTENSION(&ext, &p, RSTRING(oid)->len)) + if(!d2i_X509_EXTENSION((X509_EXTENSION**)&DATA_PTR(self), + &p, RSTRING(oid)->len)) ossl_raise(eX509ExtError, NULL); return self; } -- cgit v1.2.3