x_x509.c: Simplify X509_new_with_libctx() using x509_set0_libctx()

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/11808)
This commit is contained in:
Dr. David von Oheimb 2020-08-12 21:07:12 +02:00
parent 09c2e26e64
commit 4cdf44c46b

View File

@ -152,10 +152,7 @@ X509 *X509_new_with_libctx(OPENSSL_CTX *libctx, const char *propq)
X509 *cert = NULL;
cert = (X509 *)ASN1_item_new((X509_it()));
if (cert != NULL) {
cert->libctx = libctx;
cert->propq = propq;
}
(void)x509_set0_libctx(cert, libctx, propq);
return cert;
}