Don't crash if there are no trusted certs
authorMatt Caswell <matt@openssl.org>
Wed, 18 Apr 2018 13:20:29 +0000 (14:20 +0100)
committerMatt Caswell <matt@openssl.org>
Thu, 19 Apr 2018 07:53:40 +0000 (08:53 +0100)
commit1c705121af8a0f8095d7cb36419e1166f42cc1e6
tree1f2b3f5003d76e5db037d64758e6eb96d2730bce
parentc324ecfb2d4a6608d7a5f848968180c7995fc9a6
Don't crash if there are no trusted certs

The X509_STORE_CTX_init() docs explicitly allow a NULL parameter for the
X509_STORE. Therefore we shouldn't crash if we subsequently call
X509_verify_cert() and no X509_STORE has been set.

Fixes #2462

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6001)
crypto/x509/x509_lu.c