diff options
author | Shane Lontis <shane.lontis@oracle.com> | 2021-02-24 15:59:14 +1000 |
---|---|---|
committer | Shane Lontis <shane.lontis@oracle.com> | 2021-03-03 16:16:19 +1000 |
commit | 4e4ae84056133c863860e27ceedae8bd3fb0a402 (patch) | |
tree | b2d2d94cb5544de299abf32fbe9643e8f0e3a040 /ssl | |
parent | 81f9af3460dca0fe37d3a240cb385efbf0f0d362 (diff) |
Fix NULL access in ssl_build_cert_chain() when ctx is NULL.
Fixes #14294
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14295)
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/ssl_cert.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ssl/ssl_cert.c b/ssl/ssl_cert.c index a9d9b9ca06..f78cb99c18 100644 --- a/ssl/ssl_cert.c +++ b/ssl/ssl_cert.c @@ -878,7 +878,7 @@ int ssl_build_cert_chain(SSL *s, SSL_CTX *ctx, int flags) untrusted = cpk->chain; } - xs_ctx = X509_STORE_CTX_new_ex(real_ctx->libctx, ctx->propq); + xs_ctx = X509_STORE_CTX_new_ex(real_ctx->libctx, real_ctx->propq); if (xs_ctx == NULL) { ERR_raise(ERR_LIB_SSL, ERR_R_MALLOC_FAILURE); goto err; |