-/* $OpenBSD: cms_sd.c,v 1.32 2024/04/07 06:34:42 tb Exp $ */
+/* $OpenBSD: cms_sd.c,v 1.33 2024/04/20 10:11:55 tb Exp $ */
/*
* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project.
return 1;
}
-static int
-cms_add_digest_smcap(STACK_OF(X509_ALGOR) **sk, int nid, int arg)
-{
- if (EVP_get_digestbynid(nid))
- return CMS_add_simple_smimecap(sk, nid, arg);
- return 1;
-}
-
int
CMS_add_standard_smimecap(STACK_OF(X509_ALGOR) **smcap)
{
if (!cms_add_cipher_smcap(smcap, NID_aes_256_cbc, -1) ||
- !cms_add_digest_smcap(smcap, NID_id_GostR3411_94, -1) ||
- !cms_add_cipher_smcap(smcap, NID_id_Gost28147_89, -1) ||
!cms_add_cipher_smcap(smcap, NID_aes_192_cbc, -1) ||
!cms_add_cipher_smcap(smcap, NID_aes_128_cbc, -1) ||
!cms_add_cipher_smcap(smcap, NID_des_ede3_cbc, -1) ||
-/* $OpenBSD: pk7_smime.c,v 1.26 2023/02/16 08:38:17 tb Exp $ */
+/* $OpenBSD: pk7_smime.c,v 1.27 2024/04/20 10:11:55 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project.
*/
return 1;
}
-static int
-add_digest_smcap(STACK_OF(X509_ALGOR) *sk, int nid, int arg)
-{
- if (EVP_get_digestbynid(nid))
- return PKCS7_simple_smimecap(sk, nid, arg);
- return 1;
-}
-
PKCS7_SIGNER_INFO *
PKCS7_sign_add_signer(PKCS7 *p7, X509 *signcert, EVP_PKEY *pkey,
const EVP_MD *md, int flags)
goto err;
}
if (!add_cipher_smcap(smcap, NID_aes_256_cbc, -1) ||
- !add_digest_smcap(smcap, NID_id_GostR3411_94, -1) ||
- !add_digest_smcap(smcap, NID_id_tc26_gost3411_2012_256, -1) ||
- !add_digest_smcap(smcap, NID_id_tc26_gost3411_2012_512, -1) ||
- !add_cipher_smcap(smcap, NID_id_Gost28147_89, -1) ||
!add_cipher_smcap(smcap, NID_aes_192_cbc, -1) ||
!add_cipher_smcap(smcap, NID_aes_128_cbc, -1) ||
!add_cipher_smcap(smcap, NID_des_ede3_cbc, -1) ||