aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl/ossl_x509attr.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/openssl/ossl_x509attr.c')
-rw-r--r--ext/openssl/ossl_x509attr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/openssl/ossl_x509attr.c b/ext/openssl/ossl_x509attr.c
index 576ad4c40a..f03302d352 100644
--- a/ext/openssl/ossl_x509attr.c
+++ b/ext/openssl/ossl_x509attr.c
@@ -91,12 +91,13 @@ ossl_x509attr_initialize(int argc, VALUE *argv, VALUE self)
X509_ATTRIBUTE *attr;
unsigned char *p;
+ GetX509Attr(self, attr);
if(rb_scan_args(argc, argv, "11", &oid, &value) == 1){
- GetX509Attr(self, attr);
oid = ossl_to_der_if_possible(oid);
StringValue(oid);
p = RSTRING(oid)->ptr;
- if(!d2i_X509_ATTRIBUTE(&attr, &p, RSTRING(oid)->len)){
+ if(!d2i_X509_ATTRIBUTE((X509_ATTRIBUTE**)&DATA_PTR(self),
+ &p, RSTRING(oid)->len)){
ossl_raise(eX509AttrError, NULL);
}
return self;