diff mbox series

[05/10] sae: include password identifier IE in commit

Message ID 20231205154647.1778389-5-prestwoj@gmail.com (mailing list archive)
State Accepted, archived
Headers show
Series [01/10] scan: parse password identifier/exclusive bits | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
prestwoj/iwd-ci-gitlint success GitLint

Commit Message

James Prestwood Dec. 5, 2023, 3:46 p.m. UTC
Include the IE if a password identifier is being used. This is only
supported by H2E as required by 802.11.
---
 src/sae.c | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox series

Patch

diff --git a/src/sae.c b/src/sae.c
index 336954b4..da00e4da 100644
--- a/src/sae.c
+++ b/src/sae.c
@@ -637,6 +637,14 @@  old_commit:
 		ie_tlv_builder_set_data(&builder, sm->token, sm->token_len);
 	}
 
+	if (sm->sae_type == CRYPTO_SAE_HASH_TO_ELEMENT &&
+					sm->handshake->password_identifier) {
+		ie_tlv_builder_next(&builder, IE_TYPE_PASSWORD_IDENTIFIER);
+		ie_tlv_builder_set_data(&builder,
+				sm->handshake->password_identifier,
+				strlen(sm->handshake->password_identifier));
+	}
+
 	ie_tlv_builder_finalize(&builder, &len);
 
 	return ptr - commit + len;