aboutsummaryrefslogtreecommitdiffstats
path: root/src/rsn_supp
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2014-12-29 11:03:01 (GMT)
committerJouni Malinen <j@w1.fi>2014-12-29 17:44:51 (GMT)
commit7d711541dced759b34313477d5d163e65c5b0131 (patch)
tree6e8a9955caf588a69ef0fb2e0b2a1644e7560303 /src/rsn_supp
parent7193254456259a4171ba61f8c6f7ae2a382385df (diff)
downloadhostap-7d711541dced759b34313477d5d163e65c5b0131.zip
hostap-7d711541dced759b34313477d5d163e65c5b0131.tar.gz
hostap-7d711541dced759b34313477d5d163e65c5b0131.tar.bz2
Clear TK part of PTK after driver key configuration
There is no need for wpa_supplicant to maintain a copy of the TK part of PTK after this has been configured to the driver, so clear that from heap memory and only maintain KEK and KCK during association to allow additional EAPOL-Key handshakes. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/rsn_supp')
-rw-r--r--src/rsn_supp/wpa.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c
index 9a6153a..c88f1e4 100644
--- a/src/rsn_supp/wpa.c
+++ b/src/rsn_supp/wpa.c
@@ -609,6 +609,10 @@ static int wpa_supplicant_install_ptk(struct wpa_sm *sm,
return -1;
}
+ /* TK is not needed anymore in supplicant */
+ os_memset(sm->ptk.tk1, 0, sizeof(sm->ptk.tk1));
+ os_memset(sm->ptk.u.tk2, 0, sizeof(sm->ptk.u.tk2));
+
if (sm->wpa_ptk_rekey) {
eloop_cancel_timeout(wpa_sm_rekey_ptk, sm, NULL);
eloop_register_timeout(sm->wpa_ptk_rekey, 0, wpa_sm_rekey_ptk,