diff --git a/hostapd/Makefile b/hostapd/Makefile index 456fb184f..2a7283a92 100644 --- a/hostapd/Makefile +++ b/hostapd/Makefile @@ -919,11 +919,13 @@ endif ifdef NEED_AES_ENCBLOCK AESOBJS += ../src/crypto/aes-encblock.o endif +ifneq ($(CONFIG_TLS), openssl) ifneq ($(CONFIG_TLS), linux) ifneq ($(CONFIG_TLS), wolfssl) AESOBJS += ../src/crypto/aes-omac1.o endif endif +endif ifdef NEED_AES_UNWRAP ifneq ($(CONFIG_TLS), openssl) ifneq ($(CONFIG_TLS), linux) diff --git a/src/crypto/crypto_openssl.c b/src/crypto/crypto_openssl.c index 8c3484abe..b644b6ca7 100644 --- a/src/crypto/crypto_openssl.c +++ b/src/crypto/crypto_openssl.c @@ -16,9 +16,9 @@ #include #include #include -#ifdef CONFIG_OPENSSL_CMAC +#if OPENSSL_VERSION_NUMBER < 0x30000000L #include -#endif /* CONFIG_OPENSSL_CMAC */ +#endif /* OpenSSL version < 3.0 */ #ifdef CONFIG_ECC #include #include @@ -1214,7 +1214,6 @@ int crypto_get_random(void *buf, size_t len) } -#ifdef CONFIG_OPENSSL_CMAC int omac1_aes_vector(const u8 *key, size_t key_len, size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac) { @@ -1308,7 +1307,6 @@ int omac1_aes_256(const u8 *key, const u8 *data, size_t data_len, u8 *mac) { return omac1_aes_vector(key, 32, 1, &data, &data_len, mac); } -#endif /* CONFIG_OPENSSL_CMAC */ struct crypto_bignum * crypto_bignum_init(void) diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile index 9adadf141..6e50c808b 100644 --- a/wpa_supplicant/Makefile +++ b/wpa_supplicant/Makefile @@ -75,7 +75,6 @@ endif ifdef CONFIG_FIPS CONFIG_NO_RANDOM_POOL= -CONFIG_OPENSSL_CMAC=y endif OBJS = config.o @@ -1330,9 +1329,7 @@ ifdef NEED_AES_ENCBLOCK AESOBJS += ../src/crypto/aes-encblock.o endif NEED_AES_ENC=y -ifdef CONFIG_OPENSSL_CMAC -CFLAGS += -DCONFIG_OPENSSL_CMAC -else +ifneq ($(CONFIG_TLS), openssl) ifneq ($(CONFIG_TLS), linux) ifneq ($(CONFIG_TLS), wolfssl) AESOBJS += ../src/crypto/aes-omac1.o