diff options
Diffstat (limited to 'crypto/x509/x_x509.c')
-rw-r--r-- | crypto/x509/x_x509.c | 25 |
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. |