crypto: Clear temporary heap allocations before freeing
This reduces the time private keys may remain in heap memory after use. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
a15a7fcf69
commit
77a2c3941e
4 changed files with 11 additions and 10 deletions
|
@ -95,7 +95,7 @@ static int aes_s2v(const u8 *key, size_t num_elem, const u8 *addr[],
|
|||
os_memcpy(buf, addr[i], len[i]);
|
||||
xorend(buf, len[i], tmp, AES_BLOCK_SIZE);
|
||||
ret = omac1_aes_128(key, buf, len[i], mac);
|
||||
os_free(buf);
|
||||
bin_clear_free(buf, len[i]);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue