diff options
Diffstat (limited to 'src/crypto/sha1-pbkdf2.c')
-rw-r--r-- | src/crypto/sha1-pbkdf2.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/crypto/sha1-pbkdf2.c b/src/crypto/sha1-pbkdf2.c index 8effe2fe..d2bdc95e 100644 --- a/src/crypto/sha1-pbkdf2.c +++ b/src/crypto/sha1-pbkdf2.c @@ -50,6 +50,8 @@ static int pbkdf2_sha1_f(const char *passphrase, const u8 *ssid, for (j = 0; j < SHA1_MAC_LEN; j++) digest[j] ^= tmp2[j]; } + forced_memzero(tmp, SHA1_MAC_LEN); + forced_memzero(tmp2, SHA1_MAC_LEN); return 0; } @@ -87,6 +89,7 @@ int pbkdf2_sha1(const char *passphrase, const u8 *ssid, size_t ssid_len, pos += plen; left -= plen; } + forced_memzero(digest, SHA1_MAC_LEN); return 0; } |