mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-26 18:59:22 +01:00
handshake: Use align_len macro
This commit is contained in:
parent
415c209276
commit
c033fcbf5e
@ -517,7 +517,7 @@ bool handshake_decode_fte_key(struct handshake_state *s, const uint8_t *wrapped,
|
|||||||
size_t key_len, uint8_t *key_out)
|
size_t key_len, uint8_t *key_out)
|
||||||
{
|
{
|
||||||
const struct crypto_ptk *ptk = handshake_state_get_ptk(s);
|
const struct crypto_ptk *ptk = handshake_state_get_ptk(s);
|
||||||
size_t padded_len = key_len < 16 ? 16 : ((key_len + 7) & ~7);
|
size_t padded_len = key_len < 16 ? 16 : align_len(key_len, 8);
|
||||||
|
|
||||||
if (!aes_unwrap(ptk->kek, wrapped, padded_len + 8, key_out))
|
if (!aes_unwrap(ptk->kek, wrapped, padded_len + 8, key_out))
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user