diff options
author | Matt Caswell <matt@openssl.org> | 2020-04-01 17:05:07 +0200 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2020-04-09 00:56:29 +0200 |
commit | a959b4fa97a4781439eea359bae4216e5aa0c590 (patch) | |
tree | 2a86c932859f35f5b9e127879ce41b31014cdb89 /ssl/statem | |
parent | Add X509_STORE_CTX_new_with_libctx() (diff) | |
download | openssl-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.c | 3 |
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, |