From: Pauli Date: Thu, 15 Apr 2021 00:33:59 +0000 (+1000) Subject: cms: remove most references to EVP_sha1() X-Git-Tag: openssl-3.0.0-alpha15~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27344bb82a65ce13de4c9f6c78615fa91d93d3eb;p=thirdparty%2Fopenssl.git cms: remove most references to EVP_sha1() Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/14881) --- diff --git a/crypto/cms/cms_smime.c b/crypto/cms/cms_smime.c index 3ab4cd2e6f5..d48bbcb6c70 100644 --- a/crypto/cms/cms_smime.c +++ b/crypto/cms/cms_smime.c @@ -169,6 +169,10 @@ CMS_ContentInfo *CMS_digest_create_ex(BIO *in, const EVP_MD *md, { CMS_ContentInfo *cms; + /* + * Because the EVP_MD is cached and can be a legacy algorithm, we + * cannot fetch the algorithm if it isn't supplied. + */ if (md == NULL) md = EVP_sha1(); cms = ossl_cms_DigestedData_create(md, ctx, propq);