mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-03 10:32:33 +01:00
crypto: Memzero copies of secrets
This commit is contained in:
parent
52afe193e6
commit
881fbd1d80
@ -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);
|
l_cipher_free(cipher);
|
||||||
|
explicit_bzero(&b[1], 8);
|
||||||
|
|
||||||
/* Check IV */
|
/* Check IV */
|
||||||
if (b[0] != 0xa6a6a6a6a6a6a6a6)
|
if (b[0] != 0xa6a6a6a6a6a6a6a6)
|
||||||
@ -325,6 +326,7 @@ int crypto_psk_from_passphrase(const char *passphrase,
|
|||||||
if (out_psk)
|
if (out_psk)
|
||||||
memcpy(out_psk, psk, sizeof(psk));
|
memcpy(out_psk, psk, sizeof(psk));
|
||||||
|
|
||||||
|
explicit_bzero(psk, sizeof(psk));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user