diff mbox series

[6/9] handshake: remove hardcoded kek_len for FTE decode

Message ID 20230410220135.373872-7-prestwoj@gmail.com (mailing list archive)
State New
Headers show
Series Support FT-8021X-SHA384 | expand

Commit Message

James Prestwood April 10, 2023, 10:01 p.m. UTC
The KEK length should be obtained with the getter to ensure the
AKM is taken into account
---
 src/handshake.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Denis Kenzior April 16, 2023, 6:01 p.m. UTC | #1
Hi James,

On 4/10/23 17:01, James Prestwood wrote:
> The KEK length should be obtained with the getter to ensure the
> AKM is taken into account
> ---
>   src/handshake.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 

Applied, thanks.

Regards,
-Denis
diff mbox series

Patch

diff --git a/src/handshake.c b/src/handshake.c
index 362ff58a..70aeda37 100644
--- a/src/handshake.c
+++ b/src/handshake.c
@@ -1035,7 +1035,7 @@  bool handshake_decode_fte_key(struct handshake_state *s, const uint8_t *wrapped,
 				size_t key_len, uint8_t *key_out)
 {
 	const uint8_t *kek;
-	size_t kek_len = 16;
+	size_t kek_len = handshake_state_get_kek_len(s);
 	size_t padded_len = key_len < 16 ? 16 : align_len(key_len, 8);
 
 	if (s->akm_suite & (IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA256 |