Cache some CRL related extensions.
[openssl.git] / crypto / asn1 / x_x509.c
index 95774673c42df831f7f6336c2c8ebc1c2ef8234a..73f61e1eb9f894d1d7686a079a1a3c1bb7513717 100644 (file)
@@ -81,7 +81,8 @@ IMPLEMENT_ASN1_FUNCTIONS(X509_CINF)
 
 extern void policy_cache_free(X509_POLICY_CACHE *cache);
 
-static int x509_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it)
+static int x509_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it,
+                                                               void *exarg)
 {
        X509 *ret = (X509 *)*pval;
 
@@ -95,6 +96,7 @@ static int x509_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it)
                ret->skid = NULL;
                ret->akid = NULL;
                ret->aux = NULL;
+               ret->crldp = NULL;
                CRYPTO_new_ex_data(CRYPTO_EX_INDEX_X509, ret, &ret->ex_data);
                break;
 
@@ -108,6 +110,7 @@ static int x509_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it)
                X509_CERT_AUX_free(ret->aux);
                ASN1_OCTET_STRING_free(ret->skid);
                AUTHORITY_KEYID_free(ret->akid);
+               CRL_DIST_POINTS_free(ret->crldp);
                policy_cache_free(ret->policy_cache);
 
                if (ret->name != NULL) OPENSSL_free(ret->name);