From deab292a260b0cf63c5b85bdaaa5f9785dc2f2ba Mon Sep 17 00:00:00 2001 From: Rajeev Ranjan Date: Tue, 5 Dec 2023 00:44:48 +0100 Subject: [PATCH] Revert "e_null_hmac.c, build.info, c_allc.c, evp.h: add dummy cipher EVP_enc_null_hmac_sha256, for populating NID." This reverts commit cf30cbe42374156277eaeb16cf95ae525ffc06f8. --- crypto/evp/build.info | 2 +- crypto/evp/c_allc.c | 4 ---- crypto/evp/e_null_hmac.c | 42 ---------------------------------------- include/openssl/evp.h | 3 --- 4 files changed, 1 insertion(+), 50 deletions(-) delete mode 100644 crypto/evp/e_null_hmac.c diff --git a/crypto/evp/build.info b/crypto/evp/build.info index 870e1e40ec45e..95fea31226b09 100644 --- a/crypto/evp/build.info +++ b/crypto/evp/build.info @@ -14,7 +14,7 @@ SOURCE[../../libcrypto]=$COMMON\ c_allc.c c_alld.c bio_ok.c \ evp_pkey.c evp_pbe.c p5_crpt.c p5_crpt2.c pbe_scrypt.c \ e_aes_cbc_hmac_sha1.c e_aes_cbc_hmac_sha256.c e_rc4_hmac_md5.c \ - e_chacha20_poly1305.c e_null_hmac.c \ + e_chacha20_poly1305.c \ legacy_sha.c ctrl_params_translate.c \ cmeth_lib.c diff --git a/crypto/evp/c_allc.c b/crypto/evp/c_allc.c index c212cc74dfb8a..c74b3dcd753a6 100644 --- a/crypto/evp/c_allc.c +++ b/crypto/evp/c_allc.c @@ -265,8 +265,4 @@ void openssl_add_all_ciphers_int(void) EVP_add_cipher(EVP_chacha20_poly1305()); # endif #endif - -#ifndef OPENSSL_NO_INTEGRITY_ONLY_CIPHER - EVP_add_cipher(EVP_enc_null_hmac_sha256()); -#endif } diff --git a/crypto/evp/e_null_hmac.c b/crypto/evp/e_null_hmac.c deleted file mode 100644 index 9f97191ec9f0f..0000000000000 --- a/crypto/evp/e_null_hmac.c +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include - -#ifndef OPENSSL_NO_INTEGRITY_ONLY_CIPHER - -# include -# include -# include "crypto/evp.h" -# include "evp_local.h" - -static EVP_CIPHER n_cipher = { - NID_enull_hmac_sha256, - 0, 0, 0, 0, - EVP_ORIG_GLOBAL, - NULL, - NULL, - NULL, - 0, - NULL, - NULL, - NULL, - NULL -}; - -/* - * dummy cipher just to populate the NID value. - * TODO: look for better way of doing it. - */ -const EVP_CIPHER *EVP_enc_null_hmac_sha256(void) -{ - return (&n_cipher); -} - -#endif diff --git a/include/openssl/evp.h b/include/openssl/evp.h index 10b83ca178089..4a0f21ad99387 100644 --- a/include/openssl/evp.h +++ b/include/openssl/evp.h @@ -1138,9 +1138,6 @@ const EVP_CIPHER *EVP_chacha20(void); const EVP_CIPHER *EVP_chacha20_poly1305(void); # endif # endif -# ifndef OPENSSL_NO_INTEGRITY_ONLY_CIPHER -const EVP_CIPHER *EVP_enc_null_hmac_sha256(void); -# endif # ifndef OPENSSL_NO_SEED const EVP_CIPHER *EVP_seed_ecb(void);