Submitted by: Julia Lawall <julia@diku.dk>
Approved by: steve@openssl.org

Correct EVP_DigestVerifyFinal error handling.
This commit is contained in:
Dr. Stephen Henson 2009-09-30 23:50:10 +00:00
parent 50425bc137
commit 43f21e62aa

View File

@ -799,7 +799,7 @@ int CMS_SignerInfo_verify(CMS_SignerInfo *si)
}
r = EVP_DigestVerifyFinal(&mctx,
si->signature->data, si->signature->length);
if (!r)
if (r <= 0)
CMSerr(CMS_F_CMS_SIGNERINFO_VERIFY, CMS_R_VERIFICATION_FAILURE);
err:
EVP_MD_CTX_cleanup(&mctx);