3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 13:02:44 +01:00

crypto: Memzero copies of secrets

This commit is contained in:
Andrew Zaborowski 2019-03-21 03:54:13 +01:00 committed by Denis Kenzior
parent 52afe193e6
commit 881fbd1d80

View File

@ -161,6 +161,7 @@ bool aes_unwrap(const uint8_t *kek, size_t kek_len, const uint8_t *in, size_t le
}
l_cipher_free(cipher);
explicit_bzero(&b[1], 8);
/* Check IV */
if (b[0] != 0xa6a6a6a6a6a6a6a6)
@ -325,6 +326,7 @@ int crypto_psk_from_passphrase(const char *passphrase,
if (out_psk)
memcpy(out_psk, psk, sizeof(psk));
explicit_bzero(psk, sizeof(psk));
return 0;
}