summaryrefslogtreecommitdiffstats
path: root/crypto/ocsp/ocsp_vfy.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/ocsp/ocsp_vfy.c')
-rw-r--r--crypto/ocsp/ocsp_vfy.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/ocsp/ocsp_vfy.c b/crypto/ocsp/ocsp_vfy.c
index be9bf5b0f0..415d67e61c 100644
--- a/crypto/ocsp/ocsp_vfy.c
+++ b/crypto/ocsp/ocsp_vfy.c
@@ -308,6 +308,8 @@ static int ocsp_match_issuerid(X509 *cert, OCSP_CERTID *cid,
}
mdlen = EVP_MD_size(dgst);
+ if (mdlen < 0)
+ return -1;
if ((cid->issuerNameHash->length != mdlen) ||
(cid->issuerKeyHash->length != mdlen))
return 0;