From 842dc98705e32789bbfef230dc02ab43885d429f Mon Sep 17 00:00:00 2001 From: Kirill Marinushkin Date: Sun, 24 Apr 2016 11:30:08 +0200 Subject: [PATCH] Add aliases for des-ede-ecb and des-ede3-ecb ciphers. Currently we can get all block ciphers with EVP_get_cipherbyname("-") for example, by names "aes-128-ecb" or "des-ede-cbc". I found a problem with des-ede-ecb and des-ede3-ecb ciphers as they can be accessed only with names: EVP_get_cipherbyname("des-ede") EVP_get_cipherbyname("des-ede3") It breaks the general concept. In this patch I add aliases which allow to use names: EVP_get_cipherbyname("des-ede-ecb") EVP_get_cipherbyname("des-ede3-ecb") in addition to the currently used names. Reviewed-by: Richard Levitte Reviewed-by: Rich Salz --- crypto/evp/c_allc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crypto/evp/c_allc.c b/crypto/evp/c_allc.c index ac172e84c4..0482f78199 100644 --- a/crypto/evp/c_allc.c +++ b/crypto/evp/c_allc.c @@ -92,7 +92,11 @@ void openssl_add_all_ciphers_int(void) EVP_add_cipher(EVP_des_ecb()); EVP_add_cipher(EVP_des_ede()); + EVP_add_cipher_alias(SN_des_ede_ecb, "DES-EDE-ECB"); + EVP_add_cipher_alias(SN_des_ede_ecb, "des-ede-ecb"); EVP_add_cipher(EVP_des_ede3()); + EVP_add_cipher_alias(SN_des_ede3_ecb, "DES-EDE3-ECB"); + EVP_add_cipher_alias(SN_des_ede3_ecb, "des-ede3-ecb"); EVP_add_cipher(EVP_des_ede3_wrap()); EVP_add_cipher_alias(SN_id_smime_alg_CMS3DESwrap, "des3-wrap"); #endif -- 2.25.1