aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@codeaurora.org>2019-08-27 13:33:15 (GMT)
committerJouni Malinen <j@w1.fi>2019-10-15 12:39:22 (GMT)
commitcf84246ebb9ce61e99f6302ea07547177610dde4 (patch)
tree5673fed1be34aa444d9b0c76ccb51a17227db4c3
parentefd42852993c791376aad3a67e1ef00f0cd642d2 (diff)
downloadhostap-cf84246ebb9ce61e99f6302ea07547177610dde4.zip
hostap-cf84246ebb9ce61e99f6302ea07547177610dde4.tar.gz
hostap-cf84246ebb9ce61e99f6302ea07547177610dde4.tar.bz2
SAE: Add Rejected Groups element into H2E Commit
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
-rw-r--r--src/common/sae.c10
-rw-r--r--src/common/sae.h2
2 files changed, 11 insertions, 1 deletions
diff --git a/src/common/sae.c b/src/common/sae.c
index 39275bf..6bb1802 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 606e597..b3787e4 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() */