Return 0 when the passed object to PKCS7_set_digest() is not of type PKCS7
digest.
Fixes: c5a55463892d "Add support for digested data PKCS#7 type."
Resolves: https://github.com/openssl/openssl/issues/31551
Reviewed-by: Matt Caswell <matt@openssl.foundation>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
MergeDate: Mon Jun 22 08:17:32 2026
(Merged from https://github.com/openssl/openssl/pull/31559)
}
ERR_raise(ERR_LIB_PKCS7, PKCS7_R_WRONG_CONTENT_TYPE);
- return 1;
+ return 0;
}
STACK_OF(PKCS7_SIGNER_INFO) *PKCS7_get_signer_info(PKCS7 *p7)