aboutsummaryrefslogtreecommitdiffstats
path: root/wlantest
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2017-03-24 18:54:47 (GMT)
committerJouni Malinen <j@w1.fi>2017-03-26 18:13:17 (GMT)
commitf58afccdddd66bcb28aa0005fc4c90a7cd29d8d5 (patch)
tree60228eea8684922592dd8d2909b31d9b475aa2ce /wlantest
parent19e7ddf7fbdc40f2eeef625a63eda2fc17a3739d (diff)
downloadhostap-f58afccdddd66bcb28aa0005fc4c90a7cd29d8d5.zip
hostap-f58afccdddd66bcb28aa0005fc4c90a7cd29d8d5.tar.gz
hostap-f58afccdddd66bcb28aa0005fc4c90a7cd29d8d5.tar.bz2
wlantest: Add initial support for FT-EAP decryption
Add second half of MSK as XXKey for FT-EAP. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wlantest')
-rw-r--r--wlantest/wlantest.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/wlantest/wlantest.c b/wlantest/wlantest.c
index abe97d1..9efeea4 100644
--- a/wlantest/wlantest.c
+++ b/wlantest/wlantest.c
@@ -171,6 +171,17 @@ static int add_pmk_file(struct wlantest *wt, const char *pmk_file)
os_memcpy(p->pmk, pmk, 32);
dl_list_add(&wt->pmk, &p->list);
wpa_hexdump(MSG_DEBUG, "Added PMK from file", pmk, 32);
+
+ /* For FT, the send half of MSK is used */
+ if (hexstr2bin(&buf[64], pmk, 32) < 0)
+ continue;
+ p = os_zalloc(sizeof(*p));
+ if (p == NULL)
+ break;
+ os_memcpy(p->pmk, pmk, 32);
+ dl_list_add(&wt->pmk, &p->list);
+ wpa_hexdump(MSG_DEBUG, "Added PMK from file (2nd half of MSK)",
+ pmk, 32);
}
fclose(f);