diff --git a/crypto/pkcs7/pk7_attr.c b/crypto/pkcs7/pk7_attr.c index 5ad6670a4..7df59b735 100644 --- a/crypto/pkcs7/pk7_attr.c +++ b/crypto/pkcs7/pk7_attr.c @@ -170,7 +170,7 @@ int PKCS7_add1_attrib_digest(PKCS7_SIGNER_INFO *si, if (!os) return 0; if (!ASN1_STRING_set(os, md, mdlen) - || PKCS7_add_signed_attribute(si, NID_pkcs9_messageDigest, + || !PKCS7_add_signed_attribute(si, NID_pkcs9_messageDigest, V_ASN1_OCTET_STRING, os)) { ASN1_OCTET_STRING_free(os);