From a0c63bf7b3c7302866013e3b35aadf54a323acc7 Mon Sep 17 00:00:00 2001 From: tb Date: Sat, 20 Apr 2024 10:11:55 +0000 Subject: [PATCH] Remove more unnecessary GOST code ok jsing --- lib/libcrypto/cms/cms_sd.c | 12 +----------- lib/libcrypto/pkcs7/pk7_smime.c | 14 +------------- 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/lib/libcrypto/cms/cms_sd.c b/lib/libcrypto/cms/cms_sd.c index b7839419114..9cdd4ce1430 100644 --- a/lib/libcrypto/cms/cms_sd.c +++ b/lib/libcrypto/cms/cms_sd.c @@ -1,4 +1,4 @@ -/* $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. @@ -1070,20 +1070,10 @@ cms_add_cipher_smcap(STACK_OF(X509_ALGOR) **sk, int nid, int arg) 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) || diff --git a/lib/libcrypto/pkcs7/pk7_smime.c b/lib/libcrypto/pkcs7/pk7_smime.c index c113ac39540..cff89c34e1e 100644 --- a/lib/libcrypto/pkcs7/pk7_smime.c +++ b/lib/libcrypto/pkcs7/pk7_smime.c @@ -1,4 +1,4 @@ -/* $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. */ @@ -152,14 +152,6 @@ add_cipher_smcap(STACK_OF(X509_ALGOR) *sk, int nid, int arg) 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) @@ -192,10 +184,6 @@ PKCS7_sign_add_signer(PKCS7 *p7, X509 *signcert, EVP_PKEY *pkey, 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) || -- 2.20.1