aboutsummaryrefslogtreecommitdiffstats
path: root/wlantest/rx_data.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-11-09 18:35:24 (GMT)
committerJouni Malinen <j@w1.fi>2010-11-09 18:35:24 (GMT)
commitc09caa588250accf144095e249a4d38d5049b6d4 (patch)
tree2819aa5e724187f8ac603d04bf4297a71f95c3d2 /wlantest/rx_data.c
parent4d9f9ee7e50737ff33ca8f96e1e967594ab502b7 (diff)
downloadhostap-c09caa588250accf144095e249a4d38d5049b6d4.zip
hostap-c09caa588250accf144095e249a4d38d5049b6d4.tar.gz
hostap-c09caa588250accf144095e249a4d38d5049b6d4.tar.bz2
wlantest: Use more consistent debug levels for keys
Diffstat (limited to 'wlantest/rx_data.c')
-rw-r--r--wlantest/rx_data.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/wlantest/rx_data.c b/wlantest/rx_data.c
index d873c98..15813cf 100644
--- a/wlantest/rx_data.c
+++ b/wlantest/rx_data.c
@@ -124,13 +124,17 @@ static int try_pmk(struct wlantest_bss *bss, struct wlantest_sta *sta,
bss->bssid, sta->addr, sta->anonce, sta->snonce,
(u8 *) &ptk, ptk_len,
0 /* FIX: SHA256 based on AKM */);
- if (check_mic(ptk.kck, ver,
- data, len) < 0)
+ if (check_mic(ptk.kck, ver, data, len) < 0)
return -1;
- wpa_printf(MSG_INFO, "Derived PTK for STA " MACSTR " BSSID " MACSTR
- ")", MAC2STR(sta->addr), MAC2STR(bss->bssid));
+ wpa_printf(MSG_INFO, "Derived PTK for STA " MACSTR " BSSID " MACSTR,
+ MAC2STR(sta->addr), MAC2STR(bss->bssid));
os_memcpy(&sta->ptk, &ptk, sizeof(ptk));
+ wpa_hexdump(MSG_DEBUG, "PTK:KCK", sta->ptk.kck, 16);
+ wpa_hexdump(MSG_DEBUG, "PTK:KEK", sta->ptk.kek, 16);
+ wpa_hexdump(MSG_DEBUG, "PTK:TK1", sta->ptk.tk1, 16);
+ if (ptk_len > 48)
+ wpa_hexdump(MSG_DEBUG, "PTK:TK2", sta->ptk.u.tk2, 16);
sta->ptk_set = 1;
return 0;
}
@@ -276,7 +280,7 @@ static void learn_kde_keys(struct wlantest_bss *bss, u8 *buf, size_t len)
if (ie.gtk_len >= 2 && ie.gtk_len <= 2 + 32) {
int id;
id = ie.gtk[0] & 0x03;
- wpa_printf(MSG_INFO, "GTK KeyID=%u tx=%u",
+ wpa_printf(MSG_DEBUG, "GTK KeyID=%u tx=%u",
id, !!(ie.gtk[0] & 0x04));
if ((ie.gtk[0] & 0xf8) || ie.gtk[1])
wpa_printf(MSG_INFO, "GTK KDE: Reserved field "
@@ -302,9 +306,10 @@ static void learn_kde_keys(struct wlantest_bss *bss, u8 *buf, size_t len)
wpa_printf(MSG_INFO, "Unexpected IGTK KeyID "
"%u", id);
} else {
- wpa_printf(MSG_INFO, "IGTK KeyID %u", id);
- wpa_hexdump(MSG_INFO, "IPN", ie.igtk + 2, 6);
- wpa_hexdump(MSG_INFO, "IGTK", ie.igtk + 8, 16);
+ wpa_printf(MSG_DEBUG, "IGTK KeyID %u", id);
+ wpa_hexdump(MSG_DEBUG, "IPN", ie.igtk + 2, 6);
+ wpa_hexdump(MSG_DEBUG, "IGTK", ie.igtk + 8,
+ 16);
os_memcpy(bss->igtk[id], ie.igtk + 8, 16);
bss->igtk_set[id] = 1;
}