From 6f574704b986234f68c5065a05d66fbe4c060d3f Mon Sep 17 00:00:00 2001 From: Chaitanya Tata Date: Thu, 12 Dec 2024 01:46:29 +0530 Subject: [PATCH] wifi: hostap: Remove CRYPTO default We have now fully migrated to CRYPTO_ALT which is a superset, so, remove unused CRYPTO module and it's related files. Signed-off-by: Chaitanya Tata --- doc/releases/release-notes-4.1.rst | 2 ++ modules/hostap/CMakeLists.txt | 42 ---------------------------- modules/hostap/Kconfig | 21 -------------- tests/net/wifi/configs/testcase.yaml | 10 +------ 4 files changed, 3 insertions(+), 72 deletions(-) diff --git a/doc/releases/release-notes-4.1.rst b/doc/releases/release-notes-4.1.rst index 069cdcbc615..39cfce2556a 100644 --- a/doc/releases/release-notes-4.1.rst +++ b/doc/releases/release-notes-4.1.rst @@ -289,6 +289,8 @@ Networking * Wi-Fi: + * hostap: Removed the unused default Crypto module :kconfig:option:`CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO` Kconfig option. + * zperf: USB diff --git a/modules/hostap/CMakeLists.txt b/modules/hostap/CMakeLists.txt index a76b34f8a3a..ec86b658aec 100644 --- a/modules/hostap/CMakeLists.txt +++ b/modules/hostap/CMakeLists.txt @@ -671,48 +671,6 @@ zephyr_library_compile_definitions_ifdef(CONFIG_EAP_SERVER_TTLS EAP_SERVER_TTLS ) -# crypto mbedtls related -if(CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO) -zephyr_library_sources( - ${HOSTAP_SRC_BASE}/crypto/crypto_mbedtls-bignum.c - ${HOSTAP_SRC_BASE}/crypto/crypto_mbedtls-ec.c - ${HOSTAP_SRC_BASE}/crypto/crypto_mbedtls.c - ${HOSTAP_SRC_BASE}/crypto/aes-internal.c - ${HOSTAP_SRC_BASE}/crypto/aes-wrap.c - ${HOSTAP_SRC_BASE}/crypto/aes-unwrap.c - ${HOSTAP_SRC_BASE}/crypto/rc4.c - ${HOSTAP_SRC_BASE}/crypto/sha1-internal.c - ${HOSTAP_SRC_BASE}/crypto/sha1-prf.c - ${HOSTAP_SRC_BASE}/crypto/sha1-tlsprf.c - ${HOSTAP_SRC_BASE}/crypto/sha256-prf.c - ${HOSTAP_SRC_BASE}/crypto/sha256-kdf.c - ${HOSTAP_SRC_BASE}/crypto/sha384-prf.c - ${HOSTAP_SRC_BASE}/crypto/sha384-kdf.c - ${HOSTAP_SRC_BASE}/crypto/sha512-internal.c - ${HOSTAP_SRC_BASE}/crypto/sha512.c - ${HOSTAP_SRC_BASE}/crypto/sha512-prf.c - ${HOSTAP_SRC_BASE}/crypto/sha512-kdf.c -) - -zephyr_library_sources_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_WPA3 - ${HOSTAP_SRC_BASE}/crypto/sha256-kdf.c -) - -zephyr_library_sources_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE - # common - ${HOSTAP_SRC_BASE}/crypto/sha384-tlsprf.c - ${HOSTAP_SRC_BASE}/crypto/sha256-tlsprf.c - ${HOSTAP_SRC_BASE}/crypto/sha1-tlsprf.c - ${HOSTAP_SRC_BASE}/crypto/sha1-tprf.c - ${HOSTAP_SRC_BASE}/crypto/ms_funcs.c - ${HOSTAP_SRC_BASE}/crypto/aes-eax.c - # MD4 removed from MbedTLS - ${HOSTAP_SRC_BASE}/crypto/md4-internal.c - ${HOSTAP_SRC_BASE}/crypto/aes-encblock.c - ${HOSTAP_SRC_BASE}/crypto/tls_mbedtls.c -) -endif() - if(CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ALT) zephyr_include_directories( ${HOSTAP_BASE}/port/mbedtls diff --git a/modules/hostap/Kconfig b/modules/hostap/Kconfig index 2c67342fb53..99f1495aaa8 100644 --- a/modules/hostap/Kconfig +++ b/modules/hostap/Kconfig @@ -115,27 +115,6 @@ choice WIFI_NM_WPA_SUPPLICANT_CRYPTO_BACKEND WIFI_NM_WPA_SUPPLICANT_CRYPTO_ALT supports enterprise mode and DPP. -config WIFI_NM_WPA_SUPPLICANT_CRYPTO - bool "Crypto support for WiFi" - select MBEDTLS - select MBEDTLS_SHA1 - select MBEDTLS_CIPHER - select MBEDTLS_CIPHER_MODE_CTR_ENABLED - select MBEDTLS_CIPHER_MODE_CBC_ENABLED - select MBEDTLS_CIPHER_AES_ENABLED - select MBEDTLS_ECP_C - select MBEDTLS_ECP_ALL_ENABLED - select MBEDTLS_CMAC - select MBEDTLS_PKCS5_C - select MBEDTLS_PK_WRITE_C - select MBEDTLS_ECDH_C - select MBEDTLS_ECDSA_C - select MBEDTLS_ECJPAKE_C - select MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED - select MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED - select MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED - select MBEDTLS_KEY_EXCHANGE_ALL_ENABLED - config WIFI_NM_WPA_SUPPLICANT_CRYPTO_ALT bool "Crypto Mbedtls alt support for WiFi" select MBEDTLS diff --git a/tests/net/wifi/configs/testcase.yaml b/tests/net/wifi/configs/testcase.yaml index 4568fcf26eb..bcd9d965137 100644 --- a/tests/net/wifi/configs/testcase.yaml +++ b/tests/net/wifi/configs/testcase.yaml @@ -7,12 +7,8 @@ common: platform_allow: - native_sim tests: - wifi.build.crypto_default: - extra_configs: - - CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO=y wifi.build.crypto_alt: - extra_configs: - - CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ALT=y + extra_configs: [] wifi.build.crypto_none: extra_configs: - CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_NONE=y @@ -22,7 +18,6 @@ tests: - CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_MBEDTLS_PSA=y wifi.build.crypto_enterprise: extra_configs: - - CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ALT=y - CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE=y - CONFIG_MBEDTLS_TLS_VERSION_1_2=y - CONFIG_EAP_TLS=y @@ -48,17 +43,14 @@ tests: extra_configs: - CONFIG_WIFI_NM_WPA_SUPPLICANT_WPS=y - CONFIG_WIFI_NM_WPA_SUPPLICANT_EAPOL=y - - CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO=y wifi.build.p2p: extra_configs: - CONFIG_WIFI_NM_WPA_SUPPLICANT_P2P=y - - CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO=y wifi.build.hostapd_ap: extra_configs: - CONFIG_WIFI_NM_HOSTAPD_AP=y - CONFIG_WIFI_NM_WPA_SUPPLICANT_INF_MON=n wifi.build.dpp: extra_configs: - - CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ALT=y - CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE=y - CONFIG_WIFI_NM_WPA_SUPPLICANT_DPP=y