From a559bd7c4010069e5f81f84f9f87c440e94943c0 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Tue, 27 Feb 2024 10:33:59 -0800 Subject: [PATCH] sae: remove sae_sm_set_force_group_19, use handshake 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 --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,