X509_STORE_CTX_init() allows the store to be NULL on init. Add checks
authorclaudio <claudio@openbsd.org>
Wed, 6 Oct 2021 08:29:41 +0000 (08:29 +0000)
committerclaudio <claudio@openbsd.org>
Wed, 6 Oct 2021 08:29:41 +0000 (08:29 +0000)
commita6b5a96f132b00d2d94b1adf7f4f360fc870def6
tree6d17584950421b465099e1b48af074cea158d4c8
parent1648f26734cfae1a4acf331e0e8f48014bf0a074
X509_STORE_CTX_init() allows the store to be NULL on init. Add checks
for a NULL ctx->ctx in the lookup functions using X509_STORE_CTX.
This affects X509_STORE_get1_certs(), X509_STORE_get1_crls(),
X509_STORE_CTX_get1_issuer() and X509_STORE_get_by_subject().
With this X509_verify_cert() no longer crashes with a NULL store.
With and OK tb@
lib/libcrypto/x509/x509_lu.c