]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wlantest: Add initial support for FT-EAP decryption
authorJouni Malinen <jouni@qca.qualcomm.com>
Fri, 24 Mar 2017 18:54:47 +0000 (20:54 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 26 Mar 2017 18:13:17 +0000 (21:13 +0300)
Add second half of MSK as XXKey for FT-EAP.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
wlantest/wlantest.c

index abe97d18fbd0103f9c4b1988a64ade3e0b7d45bd..9efeea487771a17637414b33e9014bc49413d1dc 100644 (file)
@@ -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);