summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehyun Kim <jeik01.kim@samsung.com>2024-05-07 15:58:17 +0900
committerJaehyun Kim <jeik01.kim@samsung.com>2024-05-07 15:58:17 +0900
commit8b2128425a5c4aedf997840828e47e7ef4a4ef32 (patch)
treef1584d78b33fe8f73f02deee1de0dd9668334a6b
parent5448fcd034e5f1b0dbc307c18217775fe4adc72d (diff)
downloadconnman-8b2128425a5c4aedf997840828e47e7ef4a4ef32.tar.gz
connman-8b2128425a5c4aedf997840828e47e7ef4a4ef32.tar.bz2
connman-8b2128425a5c4aedf997840828e47e7ef4a4ef32.zip
Set security value appropriate in WPA3/WPA2 mode
In mixed mode, check keymgmt_capa and set the security value appropriate for the supported type. Change-Id: I57c845f7b582b3f8fa0cb19513b4194ca075b4fc Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
-rwxr-xr-xgsupplicant/supplicant.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c
index 8329975b..d0033ed3 100755
--- a/gsupplicant/supplicant.c
+++ b/gsupplicant/supplicant.c
@@ -3240,6 +3240,7 @@ static void bss_compute_security(struct g_supplicant_bss *bss)
#if defined TIZEN_EXT
bss->ft_ieee8021x = FALSE;
bss->ft_psk = FALSE;
+ GSupplicantInterface *interface = bss->interface;
#endif
#if defined TIZEN_EXT
@@ -3293,9 +3294,14 @@ static void bss_compute_security(struct g_supplicant_bss *bss)
#if defined TIZEN_EXT
else if (bss->ft_ieee8021x)
bss->security = G_SUPPLICANT_SECURITY_IEEE8021X;
- else if (bss->sae)
- bss->security = G_SUPPLICANT_SECURITY_SAE;
- else if (bss->psk_sha256)
+ else if (bss->sae) {
+ if (!bss->psk)
+ bss->security = G_SUPPLICANT_SECURITY_SAE;
+ else if (interface->keymgmt_capa & G_SUPPLICANT_KEYMGMT_SAE)
+ bss->security = G_SUPPLICANT_SECURITY_SAE;
+ else
+ bss->security = G_SUPPLICANT_SECURITY_PSK;
+ } else if (bss->psk_sha256)
bss->security = G_SUPPLICANT_SECURITY_PSK_SHA256;
#endif
else if (bss->psk)