summaryrefslogtreecommitdiff
path: root/crypto/x509/x_x509.c
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2020-08-12 21:07:12 +0200
committerDr. David von Oheimb <David.von.Oheimb@siemens.com>2020-08-21 09:04:09 +0200
commit4cdf44c46b699934b86b9d842cfd4448b7dbe58e (patch)
treed355f6f7f45f6c06360a2c8ddd9db73fd339fdaf /crypto/x509/x_x509.c
parent09c2e26e640d78afe7da00d856ab113d9181e098 (diff)
downloadopenssl-new-4cdf44c46b699934b86b9d842cfd4448b7dbe58e.tar.gz
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)
Diffstat (limited to 'crypto/x509/x_x509.c')
-rw-r--r--crypto/x509/x_x509.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/crypto/x509/x_x509.c b/crypto/x509/x_x509.c
index 64bf5faa83..5ee284666c 100644
--- a/crypto/x509/x_x509.c
+++ b/crypto/x509/x_x509.c
@@ -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;
}