summaryrefslogtreecommitdiffstats
path: root/crypto/x509v3/v3_lib.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2000-12-13 13:47:33 +0000
committerDr. Stephen Henson <steve@openssl.org>2000-12-13 13:47:33 +0000
commit2aff7727f700384de6ced15a97888a8405cb1214 (patch)
treeaa5c50faad985a6acf8f1373d5dcd99f0cade1ca /crypto/x509v3/v3_lib.c
parentcc93ae3ef4f76bcf64164ef3f83854bdfd4a074e (diff)
Rewrite the extension code to use an ASN1_ITEM structure
for its ASN1 operations as well as the old style function pointers (i2d, d2i, new, free). Change standard extensions to support this. Fix a warning in BN_mul(), bn_mul.c about uninitialised 'j'.
Diffstat (limited to 'crypto/x509v3/v3_lib.c')
-rw-r--r--crypto/x509v3/v3_lib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/x509v3/v3_lib.c b/crypto/x509v3/v3_lib.c
index ea86b9ebb9..33765118c2 100644
--- a/crypto/x509v3/v3_lib.c
+++ b/crypto/x509v3/v3_lib.c
@@ -163,8 +163,9 @@ void *X509V3_EXT_d2i(X509_EXTENSION *ext)
{
X509V3_EXT_METHOD *method;
unsigned char *p;
- if(!(method = X509V3_EXT_get(ext)) || !method->d2i) return NULL;
+ if(!(method = X509V3_EXT_get(ext))) return NULL;
p = ext->value->data;
+ if(method->it) return ASN1_item_d2i(NULL, &p, ext->value->length, method->it);
return method->d2i(NULL, &p, ext->value->length);
}