]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
SAE: Add Rejected Groups element into H2E Commit
authorJouni Malinen <jouni@codeaurora.org>
Tue, 27 Aug 2019 13:33:15 +0000 (16:33 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 15 Oct 2019 12:39:22 +0000 (15:39 +0300)
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
src/common/sae.c
src/common/sae.h

index 39275bfc238a3f6487d394b5173b4652cbe2016d..6bb1802d0420b0d622970e5a82dc490a18602354 100644 (file)
@@ -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);
+       }
 }
 
 
index 606e5970e0295445093341764e2bf17efe77c8d7..b3787e4fc6ce5bfdf19a8e82ec2b1d2a7df683d7 100644 (file)
@@ -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() */