diff options
author | Rich Salz <rsalz@openssl.org> | 2014-09-10 11:43:45 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2014-09-10 12:18:50 -0400 |
commit | b2aa38a980e9fbf158aafe487fb729c492b241fb (patch) | |
tree | 303969bd4db24eab586318d8c63ed7f910c51490 /crypto/ocsp/ocsp_vfy.c | |
parent | 468ab1c20d1f3a43a63d0516fed6c9fefb3ccf71 (diff) |
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>
Diffstat (limited to 'crypto/ocsp/ocsp_vfy.c')
-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 276718304d..fc0d4cc0f5 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); |