summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2021-06-10 19:36:35 +0200
committerDr. David von Oheimb <dev@ddvo.net>2021-06-12 10:37:04 +0200
commit49a54634ec8cfff55f443bb458ab3f2d7791862d (patch)
tree734f25eb8073f05af4b200462c617078fe03bed6 /crypto
parent25eeab019c3eb191bcfcbcae501023be3b75713a (diff)
d2i_X509: revert calling X509v3_cache_extensions()
Fixes #13754 Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15705)
Diffstat (limited to 'crypto')
-rw-r--r--crypto/x509/x_x509.c25
1 files changed, 1 insertions, 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.