Skip to content

samples: net: wifi: Add TLSv1.3 support in wifi example #94313

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions modules/hostap/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,10 @@ zephyr_library_compile_definitions_ifdef(CONFIG_EAP_FAST
EAP_FAST
)

zephyr_library_compile_definitions_ifdef(CONFIG_EAP_TLSV1_3
EAP_TLSV1_3
)

zephyr_library_sources_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_EAPOL
${HOSTAP_SRC_BASE}/eapol_supp/eapol_supp_sm.c
${HOSTAP_SRC_BASE}/eap_peer/eap.c
Expand Down
4 changes: 4 additions & 0 deletions modules/hostap/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,10 @@ config EAP_ALL
select EAP_TTLS
select EAP_MSCHAPV2
default y

config EAP_TLSV1_3
bool "EAP TLSv1.3 support"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we select MBEDTLS_TLS_SESSION_TICKETS, MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED, MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED, MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED here?

select MBEDTLS_TLS_VERSION_1_3
endif # WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE

config WIFI_NM_WPA_SUPPLICANT_WPA3
Expand Down
7 changes: 7 additions & 0 deletions samples/net/wifi/shell/nxp/overlay_hostap_hosted_mcu.conf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ CONFIG_MBEDTLS_PSA_CRYPTO_C=y
CONFIG_MBEDTLS_ENTROPY_C=y
CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=8192

# TLSv1.3
CONFIG_EAP_TLSV1_3=n
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if these config are default n, we can remove from here.

CONFIG_MBEDTLS_TLS_SESSION_TICKETS=n
CONFIG_MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED=n
CONFIG_MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED=n
CONFIG_MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED=n

# mbedtls heap for enterprise case
CONFIG_MBEDTLS_ENABLE_HEAP=y
CONFIG_MBEDTLS_HEAP_SIZE=80192
Expand Down
7 changes: 7 additions & 0 deletions samples/net/wifi/shell/nxp/overlay_hostap_rw612.conf
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,12 @@ CONFIG_WIFI_NM_WPA_SUPPLICANT_PRIO=3
CONFIG_WIFI_NM_WPA_SUPPLICANT_WQ_STACK_SIZE=12288
CONFIG_WIFI_NM_WPA_SUPPLICANT_THREAD_STACK_SIZE=12288

# TLSv1.3
CONFIG_EAP_TLSV1_3=n
CONFIG_MBEDTLS_TLS_SESSION_TICKETS=n
CONFIG_MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED=n
CONFIG_MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED=n
CONFIG_MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED=n

# debug level
CONFIG_WIFI_NM_WPA_SUPPLICANT_LOG_LEVEL_INF=y
4 changes: 2 additions & 2 deletions west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ manifest:
groups:
- hal
- name: hal_nxp
revision: 2de68b601cc95417466707f1b99149820b0556ec
revision: pull/585/head
path: modules/hal/nxp
groups:
- hal
Expand Down Expand Up @@ -281,7 +281,7 @@ manifest:
- hal
- name: hostap
path: modules/lib/hostap
revision: c55683ce514953277be5566fceb38c4c2485f1e1
revision: pull/98/head
- name: liblc3
revision: 48bbd3eacd36e99a57317a0a4867002e0b09e183
path: modules/lib/liblc3
Expand Down
Loading