From 039ae3659b9ac8bbebb1d1e3c7fe5c6ba00aaf02 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Fri, 7 Jun 2019 13:58:46 -0700 Subject: [PATCH] eapol: handshake: add OSEN AKM The handshake procedure for OSEN is part of the 'AKM_DEFINED' group of AKMs. --- src/eapol.c | 3 +++ src/handshake.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/eapol.c b/src/eapol.c index 87243bab..48df5bd0 100644 --- a/src/eapol.c +++ b/src/eapol.c @@ -104,6 +104,7 @@ bool eapol_calculate_mic(enum ie_rsn_akm_suite akm, const uint8_t *kck, switch (akm) { case IE_RSN_AKM_SUITE_SAE_SHA256: case IE_RSN_AKM_SUITE_FT_OVER_SAE_SHA256: + case IE_RSN_AKM_SUITE_OSEN: return cmac_aes(kck, 16, frame, frame_len, mic, mic_len); case IE_RSN_AKM_SUITE_OWE: @@ -157,6 +158,7 @@ bool eapol_verify_mic(enum ie_rsn_akm_suite akm, const uint8_t *kck, switch (akm) { case IE_RSN_AKM_SUITE_SAE_SHA256: case IE_RSN_AKM_SUITE_FT_OVER_SAE_SHA256: + case IE_RSN_AKM_SUITE_OSEN: checksum = l_checksum_new_cmac_aes(kck, 16); break; case IE_RSN_AKM_SUITE_OWE: @@ -257,6 +259,7 @@ uint8_t *eapol_decrypt_key_data(enum ie_rsn_akm_suite akm, const uint8_t *kek, case IE_RSN_AKM_SUITE_SAE_SHA256: case IE_RSN_AKM_SUITE_FT_OVER_SAE_SHA256: case IE_RSN_AKM_SUITE_OWE: + case IE_RSN_AKM_SUITE_OSEN: if (key_data_len < 24 || key_data_len % 8) return NULL; diff --git a/src/handshake.c b/src/handshake.c index 6cf05add..476b3feb 100644 --- a/src/handshake.c +++ b/src/handshake.c @@ -390,7 +390,8 @@ bool handshake_state_derive_ptk(struct handshake_state *s) IE_RSN_AKM_SUITE_FT_OVER_SAE_SHA256 | IE_RSN_AKM_SUITE_OWE | IE_RSN_AKM_SUITE_FILS_SHA256 | - IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA256)) + IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA256 | + IE_RSN_AKM_SUITE_OSEN)) type = L_CHECKSUM_SHA256; else type = L_CHECKSUM_SHA1;