From 79eadfbc39efa297d427880791046965e7153c65 Mon Sep 17 00:00:00 2001 From: Mathy Date: Thu, 27 Feb 2020 07:05:08 -0500 Subject: [PATCH] fragattack: make TK available over control interface --- wpa_supplicant/ctrl_iface.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index 8d75c80b2..d1850d14c 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -907,6 +907,12 @@ static int wpa_supplicant_ctrl_iface_get(struct wpa_supplicant *wpa_s, } else if (os_strcmp(cmd, "tls_library") == 0) { res = tls_get_library_version(buf, buflen); #ifdef CONFIG_TESTING_OPTIONS + } else if (os_strcmp(cmd, "tk") == 0) { + if (wpa_s->last_tk_len == 0) + return -1; + res = wpa_snprintf_hex(buf, buflen, wpa_s->last_tk, + wpa_s->last_tk_len); + return res; } else if (os_strcmp(cmd, "anonce") == 0) { return wpa_snprintf_hex(buf, buflen, wpa_sm_get_anonce(wpa_s->wpa),