diff mbox series

[05/11] sae: remove sae_sm_set_force_group_19, use handshake

Message ID 20240227183405.257206-5-prestwoj@gmail.com (mailing list archive)
State Accepted, archived
Headers show
Series [01/11] doc: Document UseDefaultEccGroup | expand

Checks

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

Commit Message

James Prestwood Feb. 27, 2024, 6:33 p.m. UTC
Use the flag set into the handshake to force the default ECC group
---
 src/netdev.c | 3 ---
 src/sae.c    | 8 +-------
 src/sae.h    | 2 --
 3 files changed, 1 insertion(+), 12 deletions(-)
diff mbox series

Patch

diff --git a/src/netdev.c b/src/netdev.c
index 8a7ff092..d80ce10f 100644
--- a/src/netdev.c
+++ b/src/netdev.c
@@ -3834,9 +3834,6 @@  static void netdev_connect_common(struct netdev *netdev,
 			}
 		}
 
-		if (bss->force_default_sae_group)
-			sae_sm_set_force_group_19(netdev->ap);
-
 		break;
 	case IE_RSN_AKM_SUITE_OWE:
 		netdev->owe_sm = owe_sm_new(hs);
diff --git a/src/sae.c b/src/sae.c
index 9a10292e..bf9fb0ff 100644
--- a/src/sae.c
+++ b/src/sae.c
@@ -1459,13 +1459,6 @@  bool sae_sm_is_h2e(struct auth_proto *ap)
 	return sm->sae_type != CRYPTO_SAE_LOOPING;
 }
 
-void sae_sm_set_force_group_19(struct auth_proto *ap)
-{
-	struct sae_sm *sm = l_container_of(ap, struct sae_sm, ap);
-
-	sm->force_default_group = true;
-}
-
 static void sae_free(struct auth_proto *ap)
 {
 	struct sae_sm *sm = l_container_of(ap, struct sae_sm, ap);
@@ -1501,6 +1494,7 @@  struct auth_proto *sae_sm_new(struct handshake_state *hs,
 	sm->user_data = user_data;
 	sm->handshake = hs;
 	sm->state = SAE_STATE_NOTHING;
+	sm->force_default_group = hs->force_default_ecc_group;
 
 	sm->ap.start = sae_start;
 	sm->ap.free = sae_free;
diff --git a/src/sae.h b/src/sae.h
index ec29e624..668d084f 100644
--- a/src/sae.h
+++ b/src/sae.h
@@ -30,8 +30,6 @@  typedef void (*sae_tx_associate_func_t)(void *user_data);
 
 bool sae_sm_is_h2e(struct auth_proto *ap);
 
-void sae_sm_set_force_group_19(struct auth_proto *ap);
-
 struct auth_proto *sae_sm_new(struct handshake_state *hs,
 				sae_tx_authenticate_func_t tx_auth,
 				sae_tx_associate_func_t tx_assoc,