diff options
author | Rich Salz <rsalz@openssl.org> | 2014-09-10 11:43:45 -0400 |
---|---|---|
committer | Janusz Kozerski <j.kozerski@samsung.com> | 2014-10-20 15:26:05 +0200 |
commit | 897dc5d059e8bb69ce468bc2690d15cea1ef4b8e (patch) | |
tree | ded36c8584509a6f1d03c3aee3c90a2797e77625 | |
parent | c1c0f069b58a535080bdca66c351ac638890dc49 (diff) | |
download | openssl-897dc5d059e8bb69ce468bc2690d15cea1ef4b8e.tar.gz openssl-897dc5d059e8bb69ce468bc2690d15cea1ef4b8e.tar.bz2 openssl-897dc5d059e8bb69ce468bc2690d15cea1ef4b8e.zip |
RT2560: missing NULL check in ocsp_req_find_signer
If we don't find a signer in the internal list, then fall
through and look at the internal list; don't just return NULL.
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
(cherry picked from commit b2aa38a980e9fbf158aafe487fb729c492b241fb)
-rw-r--r-- | crypto/ocsp/ocsp_vfy.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/crypto/ocsp/ocsp_vfy.c b/crypto/ocsp/ocsp_vfy.c index 2767183..fc0d4cc 100644 --- a/crypto/ocsp/ocsp_vfy.c +++ b/crypto/ocsp/ocsp_vfy.c @@ -436,8 +436,11 @@ static int ocsp_req_find_signer(X509 **psigner, OCSP_REQUEST *req, X509_NAME *nm if(!(flags & OCSP_NOINTERN)) { signer = X509_find_by_subject(req->optionalSignature->certs, nm); - *psigner = signer; - return 1; + if (signer) + { + *psigner = signer; + return 1; + } } signer = X509_find_by_subject(certs, nm); |