mirror of
https://github.com/openssl/openssl.git
synced 2025-01-18 13:44:20 +08:00
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:
parent
09c2e26e64
commit
4cdf44c46b
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user