summaryrefslogtreecommitdiffstats
path: root/crypto/ocsp
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2011-06-03 20:53:00 +0000
committerDr. Stephen Henson <steve@openssl.org>2011-06-03 20:53:00 +0000
commit24d7159abd5e8a3fb5a75167e01b24230fb0874b (patch)
tree16bdf4ef0a62f645b5954de9a6bc137e38d79c83 /crypto/ocsp
parent7978dc989d09061913ce14a23a97c8c5f1821cdb (diff)
Backport libcrypto audit: check return values of EVP functions instead
of assuming they will always suceed.
Diffstat (limited to 'crypto/ocsp')
-rw-r--r--crypto/ocsp/ocsp_lib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/ocsp/ocsp_lib.c b/crypto/ocsp/ocsp_lib.c
index e92b86c060..a94dc838ee 100644
--- a/crypto/ocsp/ocsp_lib.c
+++ b/crypto/ocsp/ocsp_lib.c
@@ -124,7 +124,8 @@ OCSP_CERTID *OCSP_cert_id_new(const EVP_MD *dgst,
if (!(ASN1_OCTET_STRING_set(cid->issuerNameHash, md, i))) goto err;
/* Calculate the issuerKey hash, excluding tag and length */
- EVP_Digest(issuerKey->data, issuerKey->length, md, &i, dgst, NULL);
+ if (!EVP_Digest(issuerKey->data, issuerKey->length, md, &i, dgst, NULL))
+ goto err;
if (!(ASN1_OCTET_STRING_set(cid->issuerKeyHash, md, i))) goto err;