aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_server
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2014-11-30 23:25:52 (GMT)
committerJouni Malinen <j@w1.fi>2014-11-30 23:28:19 (GMT)
commit9429bee4cc76d768b529e0e5d80bb77f95fa3de9 (patch)
treecbf8cfbc3162389b5f547879769e082a2137949f /src/eap_server
parentd1f89dd732ab5f579d2f362c0523912f756c2b2d (diff)
downloadhostap-9429bee4cc76d768b529e0e5d80bb77f95fa3de9.zip
hostap-9429bee4cc76d768b529e0e5d80bb77f95fa3de9.tar.gz
hostap-9429bee4cc76d768b529e0e5d80bb77f95fa3de9.tar.bz2
EAP-TLS server: Clear temporary buffer during EMSK derivation
Now that EMSK derivation is taken into use with ERP, it is better to make sure the temporary MSK + EMSK buffer does not get left in heap after use. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/eap_server')
-rw-r--r--src/eap_server/eap_server_tls.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/eap_server/eap_server_tls.c b/src/eap_server/eap_server_tls.c
index 0c9e856..58cfe8a 100644
--- a/src/eap_server/eap_server_tls.c
+++ b/src/eap_server/eap_server_tls.c
@@ -287,7 +287,7 @@ static u8 * eap_tls_get_emsk(struct eap_sm *sm, void *priv, size_t *len)
if (emsk)
os_memcpy(emsk, eapKeyData + EAP_TLS_KEY_LEN,
EAP_EMSK_LEN);
- os_free(eapKeyData);
+ bin_clear_free(eapKeyData, EAP_TLS_KEY_LEN + EAP_EMSK_LEN);
} else
emsk = NULL;