aboutsummaryrefslogtreecommitdiffstats
path: root/wlantest
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2017-06-17 20:48:52 (GMT)
committerJouni Malinen <j@w1.fi>2017-06-19 18:13:17 (GMT)
commit567da5bbd027e8318ed0e8af817b73a9285892c3 (patch)
tree48064b126bc5c80db797f5592e4c811a0a4ca4fc /wlantest
parent9c2b8204e662da34c3518a9bdff9e84687d98623 (diff)
downloadhostap-567da5bbd027e8318ed0e8af817b73a9285892c3.zip
hostap-567da5bbd027e8318ed0e8af817b73a9285892c3.tar.gz
hostap-567da5bbd027e8318ed0e8af817b73a9285892c3.tar.bz2
DPP: Add new AKM
This new AKM is used with DPP when using the signed Connector to derive a PMK. Since the KCK, KEK, and MIC lengths are variable within a single AKM, this needs number of additional changes to get the PMK length delivered to places that need to figure out the lengths of the PTK components. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wlantest')
-rw-r--r--wlantest/rx_eapol.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/wlantest/rx_eapol.c b/wlantest/rx_eapol.c
index c4f5e8d..a0c6845 100644
--- a/wlantest/rx_eapol.c
+++ b/wlantest/rx_eapol.c
@@ -39,7 +39,7 @@ static int check_mic(const u8 *kck, size_t kck_len, int akmp, int ver,
struct ieee802_1x_hdr *hdr;
struct wpa_eapol_key *key;
u8 rx_mic[WPA_EAPOL_KEY_MIC_MAX_LEN];
- size_t mic_len = wpa_mic_len(akmp);
+ size_t mic_len = wpa_mic_len(akmp, PMK_LEN);
buf = os_memdup(data, len);
if (buf == NULL)
@@ -244,7 +244,7 @@ static void rx_data_eapol_key_2_of_4(struct wlantest *wt, const u8 *dst,
eapol = (const struct ieee802_1x_hdr *) data;
hdr = (const struct wpa_eapol_key *) (eapol + 1);
- mic_len = wpa_mic_len(sta->key_mgmt);
+ mic_len = wpa_mic_len(sta->key_mgmt, PMK_LEN);
mic = (const u8 *) (hdr + 1);
if (is_zero(hdr->key_nonce, WPA_NONCE_LEN)) {
add_note(wt, MSG_INFO, "EAPOL-Key 2/4 from " MACSTR
@@ -413,7 +413,7 @@ static u8 * decrypt_eapol_key_data(struct wlantest *wt, int akmp, const u8 *kek,
return NULL;
mic = (const u8 *) (hdr + 1);
- mic_len = wpa_mic_len(akmp);
+ mic_len = wpa_mic_len(akmp, PMK_LEN);
keydata = mic + mic_len + 2;
keydatalen = WPA_GET_BE16(mic + mic_len);
@@ -574,7 +574,7 @@ static void rx_data_eapol_key_3_of_4(struct wlantest *wt, const u8 *dst,
sta = sta_get(bss, dst);
if (sta == NULL)
return;
- mic_len = wpa_mic_len(sta->key_mgmt);
+ mic_len = wpa_mic_len(sta->key_mgmt, PMK_LEN);
eapol = (const struct ieee802_1x_hdr *) data;
hdr = (const struct wpa_eapol_key *) (eapol + 1);
@@ -805,7 +805,7 @@ static void rx_data_eapol_key_1_of_2(struct wlantest *wt, const u8 *dst,
sta = sta_get(bss, dst);
if (sta == NULL)
return;
- mic_len = wpa_mic_len(sta->key_mgmt);
+ mic_len = wpa_mic_len(sta->key_mgmt, PMK_LEN);
eapol = (const struct ieee802_1x_hdr *) data;
hdr = (const struct wpa_eapol_key *) (eapol + 1);
@@ -974,7 +974,7 @@ static void rx_data_eapol_key(struct wlantest *wt, const u8 *bssid,
if (bss) {
sta = sta_get(bss, sta_addr);
if (sta)
- mic_len = wpa_mic_len(sta->key_mgmt);
+ mic_len = wpa_mic_len(sta->key_mgmt, PMK_LEN);
}
eapol = (const struct ieee802_1x_hdr *) data;