From cf84246ebb9ce61e99f6302ea07547177610dde4 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 27 Aug 2019 16:33:15 +0300 Subject: [PATCH] SAE: Add Rejected Groups element into H2E Commit Signed-off-by: Jouni Malinen --- src/common/sae.c | 10 ++++++++++ src/common/sae.h | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/common/sae.c b/src/common/sae.c index 39275bfc2..6bb1802d0 100644 --- a/src/common/sae.c +++ b/src/common/sae.c @@ -1664,6 +1664,16 @@ void sae_write_commit(struct sae_data *sae, struct wpabuf *buf, wpa_printf(MSG_DEBUG, "SAE: own Password Identifier: %s", identifier); } + + if (sae->tmp->h2e && sae->tmp->own_rejected_groups) { + wpa_hexdump_buf(MSG_DEBUG, "SAE: own Rejected Groups", + sae->tmp->own_rejected_groups); + wpabuf_put_u8(buf, WLAN_EID_EXTENSION); + wpabuf_put_u8(buf, + 1 + wpabuf_len(sae->tmp->own_rejected_groups)); + wpabuf_put_u8(buf, WLAN_EID_EXT_REJECTED_GROUPS); + wpabuf_put_buf(buf, sae->tmp->own_rejected_groups); + } } diff --git a/src/common/sae.h b/src/common/sae.h index 606e5970e..b3787e4fc 100644 --- a/src/common/sae.h +++ b/src/common/sae.h @@ -15,7 +15,7 @@ #define SAE_MAX_PRIME_LEN 512 #define SAE_MAX_ECC_PRIME_LEN 66 #define SAE_MAX_HASH_LEN 64 -#define SAE_COMMIT_MAX_LEN (2 + 3 * SAE_MAX_PRIME_LEN) +#define SAE_COMMIT_MAX_LEN (2 + 3 * SAE_MAX_PRIME_LEN + 255) #define SAE_CONFIRM_MAX_LEN (2 + SAE_MAX_HASH_LEN) /* Special value returned by sae_parse_commit() */