]> git.ipfire.org Git - thirdparty/openssl.git/commit
CMS/PKCS7: use EVP_CIPHER_fetch() for SMIMECapabilities master
authorTodd Short <todd.short@me.com>
Fri, 17 Jul 2026 17:35:56 +0000 (13:35 -0400)
committerNorbert Pocs <norbertp@openssl.org>
Mon, 3 Aug 2026 07:06:43 +0000 (09:06 +0200)
commit02d0f65c9f8579cd1625a8d084ee8479093beb1b
tree2d456cca4dc2696371d05ce616550dfd662115d6
parent3693c35ffd07b09e096435521ad27ee7a43a6e08
CMS/PKCS7: use EVP_CIPHER_fetch() for SMIMECapabilities

Fixes #25919

Replace EVP_get_cipherbynid()/EVP_get_digestbynid() with
EVP_CIPHER_fetch()/EVP_MD_fetch() when building SMIMECapabilities
attributes, so that only algorithms available in the active providers
are advertised. This prevents RC2, DES, and GOST from appearing by
default when only the default provider is loaded.

Add CMS_add_standard_smimecap_ex() as a provider-aware replacement
for the newly-deprecated CMS_add_standard_smimecap().

Adds missing documention and new unit-tests validating the new behavior.

Signed-off-by: Todd Short <todd.short@me.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Jakub Zelenka <jakub.zelenka@openssl.foundation>
MergeDate: Mon Aug  3 07:06:44 2026
(Merged from https://github.com/openssl/openssl/pull/31990)
12 files changed:
CHANGES.md
crypto/cms/cms_sd.c
crypto/pkcs7/pk7_smime.c
doc/build.info
doc/man3/CMS_add1_signer.pod
doc/man3/CMS_add_standard_smimecap_ex.pod [new file with mode: 0644]
include/openssl/cms.h.in
test/cmsapitest.c
test/pkcs7_test.c
test/recipes/80-test_cms.t
util/libcrypto.num
util/missingcrypto.txt