Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
Add configuration for dumping keys
Browse files Browse the repository at this point in the history
This is handy in debugging crypto related issues. Also, configure the
WPA supplicant after initialization.

Signed-off-by: Krishna T <[email protected]>
  • Loading branch information
krishna T committed May 8, 2023
1 parent 7c414d4 commit 5645649
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions zephyr/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,11 @@ config WPA_SUPP_DEBUG_LEVEL
available levels and functions for emitting the messages. Note that
runtime filtering can also be configured in addition to the compile-time
filtering.

config WPA_SUPP_DEBUG_SHOW_KEYS
bool "Show keys in debug output"
help
This option can be used to show keys (e.g., PSK, EAP session keys) in
debug log messages. This can be used to debug key derivation and
authentication issues. Please do not enable this option in production.
endif
8 changes: 8 additions & 0 deletions zephyr/src/supp_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,14 @@ static void z_wpas_start(void)
goto out;
}

#if defined (CONFIG_WPA_SUPP_LOG_LEVEL_DBG) && defined (CONFIG_WPA_SUPP_DEBUG_SHOW_KEYS)
wpa_supplicant_set_debug_params(global, MSG_DEBUG, 1, 1);
#elif defined (CONFIG_WPA_SUPP_LOG_LEVEL_DBG)
wpa_supplicant_set_debug_params(global, MSG_DEBUG, 1, 0);
#else
wpa_supplicant_set_debug_params(global, MSG_INFO, 0, 0);
#endif

#if defined(CONFIG_FST) && defined(CONFIG_CTRL_IFACE)
if (!fst_global_add_ctrl(fst_ctrl_cli)) {
wpa_printf(MSG_WARNING, "Failed to add CLI FST ctrl");
Expand Down

0 comments on commit 5645649

Please sign in to comment.