diff options
author | Shane Lontis <shane.lontis@oracle.com> | 2021-02-24 06:59:14 +0100 |
---|---|---|
committer | Shane Lontis <shane.lontis@oracle.com> | 2021-03-03 07:16:19 +0100 |
commit | 4e4ae84056133c863860e27ceedae8bd3fb0a402 (patch) | |
tree | b2d2d94cb5544de299abf32fbe9643e8f0e3a040 /ssl | |
parent | Remove todos in decode_der2key.c and decode_ms2key.c (diff) | |
download | openssl-4e4ae84056133c863860e27ceedae8bd3fb0a402.tar.xz openssl-4e4ae84056133c863860e27ceedae8bd3fb0a402.zip |
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; |