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)