The branch master has been updated via 49a54634ec8cfff55f443bb458ab3f2d7791862d (commit) from 25eeab019c3eb191bcfcbcae501023be3b75713a (commit)
- Log ----------------------------------------------------------------- commit 49a54634ec8cfff55f443bb458ab3f2d7791862d Author: Dr. David von Oheimb <david.von.ohe...@siemens.com> Date: Thu Jun 10 19:36:35 2021 +0200 d2i_X509: revert calling X509v3_cache_extensions() Fixes #13754 Reviewed-by: Tomas Mraz <to...@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15705) ----------------------------------------------------------------------- Summary of changes: crypto/x509/x_x509.c | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/crypto/x509/x_x509.c b/crypto/x509/x_x509.c index 260bfda683..d14de0e77e 100644 --- a/crypto/x509/x_x509.c +++ b/crypto/x509/x_x509.c @@ -150,32 +150,9 @@ ASN1_SEQUENCE_ref(X509, x509_cb) = { ASN1_EMBED(X509, signature, ASN1_BIT_STRING) } ASN1_SEQUENCE_END_ref(X509, X509) -IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(X509, X509, X509) +IMPLEMENT_ASN1_FUNCTIONS(X509) IMPLEMENT_ASN1_DUP_FUNCTION(X509) -X509 *d2i_X509(X509 **a, const unsigned char **in, long len) -{ - X509 *cert = NULL; - int free_on_error = a != NULL && *a == NULL; - - cert = (X509 *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, (X509_it())); - /* Only cache the extensions if the cert object was passed in */ - if (cert != NULL && a != NULL) { /* then cert == *a */ - if (!ossl_x509v3_cache_extensions(cert)) { - if (free_on_error) { - *a = NULL; - X509_free(cert); - } - cert = NULL; - } - } - return cert; -} -int i2d_X509(const X509 *a, unsigned char **out) -{ - return ASN1_item_i2d((const ASN1_VALUE *)a, out, (X509_it())); -} - /* * This should only be used if the X509 object was embedded inside another * asn1 object and it needs a libctx to operate.