aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ctrl_iface.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2017-10-14 14:58:11 (GMT)
committerJouni Malinen <j@w1.fi>2017-10-16 14:47:24 (GMT)
commitbb06748f453ccba95f243e140a46c39370a08932 (patch)
tree2ca1561bb0e85104c31520ecf0702bff9d2aff98 /wpa_supplicant/ctrl_iface.c
parent143b81bad57e816668df711ed18c1a7dcad70615 (diff)
downloadhostap-bb06748f453ccba95f243e140a46c39370a08932.zip
hostap-bb06748f453ccba95f243e140a46c39370a08932.tar.gz
hostap-bb06748f453ccba95f243e140a46c39370a08932.tar.bz2
Make last received ANonce available through control interface
This makes it easier to debug 4-way handshake implementation issues without having to use a sniffer. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/ctrl_iface.c')
-rw-r--r--wpa_supplicant/ctrl_iface.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 8e50d01..746c9f1 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -749,6 +749,12 @@ static int wpa_supplicant_ctrl_iface_get(struct wpa_supplicant *wpa_s,
#endif /* CONFIG_TESTING_GET_GTK */
} else if (os_strcmp(cmd, "tls_library") == 0) {
res = tls_get_library_version(buf, buflen);
+#ifdef CONFIG_TESTING_OPTIONS
+ } else if (os_strcmp(cmd, "anonce") == 0) {
+ return wpa_snprintf_hex(buf, buflen,
+ wpa_sm_get_anonce(wpa_s->wpa),
+ WPA_NONCE_LEN);
+#endif /* CONFIG_TESTING_OPTIONS */
} else {
res = wpa_config_get_value(cmd, wpa_s->conf, buf, buflen);
}