aboutsummaryrefslogtreecommitdiff
path: root/openssl/crypto/cms/cms_sd.c
diff options
context:
space:
mode:
Diffstat (limited to 'openssl/crypto/cms/cms_sd.c')
-rw-r--r--openssl/crypto/cms/cms_sd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/openssl/crypto/cms/cms_sd.c b/openssl/crypto/cms/cms_sd.c
index e3192b9c5..77fbd1359 100644
--- a/openssl/crypto/cms/cms_sd.c
+++ b/openssl/crypto/cms/cms_sd.c
@@ -641,7 +641,8 @@ static int cms_SignerInfo_content_sign(CMS_ContentInfo *cms,
cms->d.signedData->encapContentInfo->eContentType;
unsigned char md[EVP_MAX_MD_SIZE];
unsigned int mdlen;
- EVP_DigestFinal_ex(&mctx, md, &mdlen);
+ if (!EVP_DigestFinal_ex(&mctx, md, &mdlen))
+ goto err;
if (!CMS_signed_add1_attr_by_NID(si, NID_pkcs9_messageDigest,
V_ASN1_OCTET_STRING,
md, mdlen))