commit | 940a4dbf66ddef4aff3ca7f1c3177fd582f72d40 | [log] [tgz] |
---|---|---|
author | Jouni Malinen <j@w1.fi> | Sun Mar 29 16:40:55 2015 +0300 |
committer | Jouni Malinen <j@w1.fi> | Sun Mar 29 16:40:55 2015 +0300 |
tree | 8ffd81739690dde457ead3a15c63cfb17746ac0f | |
parent | eccca102bfb9635e4694914a491a31a9df4b4763 [diff] |
Explicitly clear temporary stack buffer in sha1_t_prf() The local hash[] buffer may contain parts of the derived key, so clear it explicitly to minimize number of unnecessary copies of key material in memory. Signed-off-by: Jouni Malinen <j@w1.fi>
diff --git a/src/crypto/sha1-tprf.c b/src/crypto/sha1-tprf.c index a529494..562510f 100644 --- a/src/crypto/sha1-tprf.c +++ b/src/crypto/sha1-tprf.c
@@ -66,5 +66,7 @@ len[0] = SHA1_MAC_LEN; } + os_memset(hash, 0, SHA1_MAC_LEN); + return 0; }