Skip to content

Commit 5645649

Browse files
author
krishna T
committed
Add configuration for dumping keys
This is handy in debugging crypto related issues. Also, configure the WPA supplicant after initialization. Signed-off-by: Krishna T <[email protected]>
1 parent 7c414d4 commit 5645649

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

zephyr/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,4 +115,11 @@ config WPA_SUPP_DEBUG_LEVEL
115115
available levels and functions for emitting the messages. Note that
116116
runtime filtering can also be configured in addition to the compile-time
117117
filtering.
118+
119+
config WPA_SUPP_DEBUG_SHOW_KEYS
120+
bool "Show keys in debug output"
121+
help
122+
This option can be used to show keys (e.g., PSK, EAP session keys) in
123+
debug log messages. This can be used to debug key derivation and
124+
authentication issues. Please do not enable this option in production.
118125
endif

zephyr/src/supp_main.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,14 @@ static void z_wpas_start(void)
404404
goto out;
405405
}
406406

407+
#if defined (CONFIG_WPA_SUPP_LOG_LEVEL_DBG) && defined (CONFIG_WPA_SUPP_DEBUG_SHOW_KEYS)
408+
wpa_supplicant_set_debug_params(global, MSG_DEBUG, 1, 1);
409+
#elif defined (CONFIG_WPA_SUPP_LOG_LEVEL_DBG)
410+
wpa_supplicant_set_debug_params(global, MSG_DEBUG, 1, 0);
411+
#else
412+
wpa_supplicant_set_debug_params(global, MSG_INFO, 0, 0);
413+
#endif
414+
407415
#if defined(CONFIG_FST) && defined(CONFIG_CTRL_IFACE)
408416
if (!fst_global_add_ctrl(fst_ctrl_cli)) {
409417
wpa_printf(MSG_WARNING, "Failed to add CLI FST ctrl");

0 commit comments

Comments
 (0)