summaryrefslogtreecommitdiffstats
path: root/ssl/statem
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2020-04-01 17:05:07 +0200
committerMatt Caswell <matt@openssl.org>2020-04-09 00:56:29 +0200
commita959b4fa97a4781439eea359bae4216e5aa0c590 (patch)
tree2a86c932859f35f5b9e127879ce41b31014cdb89 /ssl/statem
parentAdd X509_STORE_CTX_new_with_libctx() (diff)
downloadopenssl-a959b4fa97a4781439eea359bae4216e5aa0c590.tar.xz
openssl-a959b4fa97a4781439eea359bae4216e5aa0c590.zip
Use X509_STORE_CTX_new_with_libctx() in libssl
Libssl is OPENSSL_CTX aware so we should use it when creating an X509_STORE_CTX. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/11457)
Diffstat (limited to 'ssl/statem')
-rw-r--r--ssl/statem/statem_lib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ssl/statem/statem_lib.c b/ssl/statem/statem_lib.c
index 71a259e8f0..651871da51 100644
--- a/ssl/statem/statem_lib.c
+++ b/ssl/statem/statem_lib.c
@@ -958,7 +958,8 @@ static int ssl_add_cert_chain(SSL *s, WPACKET *pkt, CERT_PKEY *cpk)
chain_store = s->ctx->cert_store;
if (chain_store != NULL) {
- X509_STORE_CTX *xs_ctx = X509_STORE_CTX_new();
+ X509_STORE_CTX *xs_ctx = X509_STORE_CTX_new_with_libctx(s->ctx->libctx,
+ s->ctx->propq);
if (xs_ctx == NULL) {
SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_SSL_ADD_CERT_CHAIN,