diff mbox series

Don't provide implementation of DES/RC4 if CONFIG_FIPS

Message ID SJ0PR15MB46305249A38B065C6181CD46BF249@SJ0PR15MB4630.namprd15.prod.outlook.com
State Accepted
Headers show
Series Don't provide implementation of DES/RC4 if CONFIG_FIPS | expand

Commit Message

Norman Hamer Oct. 14, 2022, 6:37 p.m. UTC
Don't provide implementation of DES/RC4 if CONFIG_FIPS

Signed-off-by: Norman Hamer <nhamer@absolute.com>
---
 src/crypto/crypto_openssl.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Jouni Malinen Nov. 26, 2022, 11:23 a.m. UTC | #1
On Fri, Oct 14, 2022 at 06:37:34PM +0000, Norman Hamer wrote:
> Don't provide implementation of DES/RC4 if CONFIG_FIPS

Thanks, applied.
diff mbox series

Patch

diff --git a/src/crypto/crypto_openssl.c b/src/crypto/crypto_openssl.c
index 700638761..fc85c2c90 100644
--- a/src/crypto/crypto_openssl.c
+++ b/src/crypto/crypto_openssl.c
@@ -321,6 +321,7 @@  int md4_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac)
 #endif /* CONFIG_FIPS */
 
 
+#ifndef CONFIG_FIPS
 int des_encrypt(const u8 *clear, const u8 *key, u8 *cypher)
 {
 	u8 pkey[8], next, tmp;
@@ -352,8 +353,10 @@  int des_encrypt(const u8 *clear, const u8 *key, u8 *cypher)
 		EVP_CIPHER_CTX_free(ctx);
 	return ret;
 }
+#endif /* CONFIG_FIPS */
 
 
+#ifndef CONFIG_FIPS
 #ifndef CONFIG_NO_RC4
 int rc4_skip(const u8 *key, size_t keylen, size_t skip,
 	     u8 *data, size_t data_len)
@@ -395,7 +398,7 @@  out:
 #endif /* OPENSSL_NO_RC4 */
 }
 #endif /* CONFIG_NO_RC4 */
-
+#endif /* CONFIG_FIPS */
 
 #ifndef CONFIG_FIPS
 int md5_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac)