[PATCH 2/4] tests: Add build configs for the PSA crypto backend
Chaitanya Tata
chaitanya.mgit at gmail.com
Wed Jul 8 13:18:58 PDT 2026
From: Chaitanya Tata <Chaitanya.Tata at nordicsemi.no>
Add tests/build/build-wpa_supplicant-psa.config and build-hostapd-psa.config
so run-build-tests.sh exercises CONFIG_TLS=psa. They enable the WPA2/3
Personal and Enterprise feature set plus the crypto module tests, point the
include/library paths at an MbedTLS 4.x / TF-PSA-Crypto 1.x source tree
(including the private builtin-driver headers), and select the internal
DES/MD4/RC4/DH-group-5 implementations the PSA Crypto API does not provide.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata at nordicsemi.no>
---
tests/build/build-hostapd-psa.config | 50 ++++++++++++++++++++
tests/build/build-wpa_supplicant-psa.config | 52 +++++++++++++++++++++
2 files changed, 102 insertions(+)
create mode 100644 tests/build/build-hostapd-psa.config
create mode 100644 tests/build/build-wpa_supplicant-psa.config
diff --git a/tests/build/build-hostapd-psa.config b/tests/build/build-hostapd-psa.config
new file mode 100644
index 000000000..8d7a52bb2
--- /dev/null
+++ b/tests/build/build-hostapd-psa.config
@@ -0,0 +1,50 @@
+CONFIG_TLS=psa
+
+# Point this at an MbedTLS 4.x + TF-PSA-Crypto 1.x source tree built with
+# static libraries (see build-wpa_supplicant-psa.config for details).
+MBEDTLS_SRC ?= /usr/local/src/mbedtls
+CFLAGS += -I$(MBEDTLS_SRC)/include
+CFLAGS += -I$(MBEDTLS_SRC)/tf-psa-crypto/include
+CFLAGS += -I$(MBEDTLS_SRC)/tf-psa-crypto/drivers/builtin/include
+LIBS += -L$(MBEDTLS_SRC)/build/library
+LIBS_h += -L$(MBEDTLS_SRC)/build/library
+LIBS_n += -L$(MBEDTLS_SRC)/build/library
+LIBS_s += -L$(MBEDTLS_SRC)/build/library
+LDFLAGS += -Wl,-rpath=$(MBEDTLS_SRC)/build/library
+
+# The PSA Crypto API has no single-DES, MD4, RC4 or finite-field DH, so use
+# hostap's bundled internal implementations for those primitives.
+CONFIG_INTERNAL_DES=y
+CONFIG_INTERNAL_MD4=y
+CONFIG_INTERNAL_RC4=y
+CONFIG_INTERNAL_DH_GROUP5=y
+
+CONFIG_EAP=y
+CONFIG_EAP_TLS=y
+CONFIG_EAP_PEAP=y
+CONFIG_EAP_TTLS=y
+CONFIG_EAP_MSCHAPV2=y
+CONFIG_EAP_GTC=y
+CONFIG_EAP_SIM=y
+CONFIG_EAP_AKA=y
+CONFIG_EAP_PWD=y
+CONFIG_RADIUS_SERVER=y
+
+CONFIG_WPS=y
+CONFIG_SAE=y
+CONFIG_SAE_PK=y
+CONFIG_FILS=y
+CONFIG_FILS_SK_PFS=y
+CONFIG_OWE=y
+CONFIG_DPP=y
+CONFIG_PASN=y
+CONFIG_SUITEB=y
+CONFIG_SUITEB192=y
+CONFIG_IEEE80211R=y
+CONFIG_IEEE80211R_AP=y
+
+CONFIG_IPV6=y
+CONFIG_MODULE_TESTS=y
+CONFIG_TESTING_OPTIONS=y
+
+CFLAGS += -Werror
diff --git a/tests/build/build-wpa_supplicant-psa.config b/tests/build/build-wpa_supplicant-psa.config
new file mode 100644
index 000000000..f96579cbb
--- /dev/null
+++ b/tests/build/build-wpa_supplicant-psa.config
@@ -0,0 +1,52 @@
+CONFIG_TLS=psa
+
+# Point this at an MbedTLS 4.x + TF-PSA-Crypto 1.x source tree built with
+# static libraries. The PSA backend needs the (private) builtin bignum/ECP
+# headers under tf-psa-crypto/drivers/builtin/include for the SAE/DPP/PASN
+# math that the PSA Crypto API does not expose.
+MBEDTLS_SRC ?= /usr/local/src/mbedtls
+CFLAGS += -I$(MBEDTLS_SRC)/include
+CFLAGS += -I$(MBEDTLS_SRC)/tf-psa-crypto/include
+CFLAGS += -I$(MBEDTLS_SRC)/tf-psa-crypto/drivers/builtin/include
+LIBS += -L$(MBEDTLS_SRC)/build/library
+LIBS_p += -L$(MBEDTLS_SRC)/build/library
+LDFLAGS += -Wl,-rpath=$(MBEDTLS_SRC)/build/library
+
+# The PSA Crypto API has no single-DES, MD4, RC4 or finite-field DH, so use
+# hostap's bundled internal implementations for those primitives.
+CONFIG_INTERNAL_DES=y
+CONFIG_INTERNAL_MD4=y
+CONFIG_INTERNAL_RC4=y
+CONFIG_INTERNAL_DH_GROUP5=y
+
+CONFIG_WPS=y
+CONFIG_EAP_TLS=y
+CONFIG_EAP_PEAP=y
+CONFIG_EAP_TTLS=y
+CONFIG_EAP_MSCHAPV2=y
+CONFIG_EAP_GTC=y
+
+CONFIG_EAP_PSK=y
+CONFIG_EAP_GPSK=y
+CONFIG_EAP_AKA=y
+CONFIG_EAP_SIM=y
+CONFIG_EAP_SAKE=y
+CONFIG_EAP_PAX=y
+CONFIG_EAP_PWD=y
+
+CONFIG_SAE=y
+CONFIG_SAE_PK=y
+CONFIG_FILS=y
+CONFIG_FILS_SK_PFS=y
+CONFIG_OWE=y
+CONFIG_DPP=y
+CONFIG_PASN=y
+CONFIG_SUITEB=y
+CONFIG_SUITEB192=y
+
+CONFIG_IPV6=y
+CONFIG_MODULE_TESTS=y
+CONFIG_EXT_PASSWORD_TEST=y
+CONFIG_TESTING_OPTIONS=y
+
+CFLAGS += -Werror
--
2.43.0
More information about the Hostap
mailing list