fragattack: make TK available over control interface

This commit is contained in:
Mathy 2020-02-27 07:05:08 -05:00
parent 1c67a07603
commit 79eadfbc39

View File

@ -907,6 +907,12 @@ static int wpa_supplicant_ctrl_iface_get(struct wpa_supplicant *wpa_s,
} else if (os_strcmp(cmd, "tls_library") == 0) { } else if (os_strcmp(cmd, "tls_library") == 0) {
res = tls_get_library_version(buf, buflen); res = tls_get_library_version(buf, buflen);
#ifdef CONFIG_TESTING_OPTIONS #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) { } else if (os_strcmp(cmd, "anonce") == 0) {
return wpa_snprintf_hex(buf, buflen, return wpa_snprintf_hex(buf, buflen,
wpa_sm_get_anonce(wpa_s->wpa), wpa_sm_get_anonce(wpa_s->wpa),