From d71061122cd91a493d69c313c68063fe8d02e3e9 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Wed, 30 Sep 2009 23:49:11 +0000 Subject: [PATCH] PR: 2058 Submitted by: Julia Lawall Approved by: steve@openssl.org Correct EVP_DigestVerifyFinal error handling. --- crypto/cms/cms_sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/cms/cms_sd.c b/crypto/cms/cms_sd.c index 83711d8af4..77fbd13596 100644 --- a/crypto/cms/cms_sd.c +++ b/crypto/cms/cms_sd.c @@ -800,7 +800,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); -- 2.25.1