File 0001-supplicant-interface-Match-more-ciphers-to-determine.patch of Package NetworkManager.24287

From 5f35dde86bd5cb21e028ac18c7a97958a826844c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
Date: Fri, 23 Apr 2021 18:45:32 +0200
Subject: [PATCH] supplicant/interface: Match more ciphers to determine AP
 security

There can also be APs which don't do wpa-psk, but do support
wpa-psk-sha256, so we should match all AKM suites the AP offers to
determine the security type we want to assign it.

[iluceno@suse.de: Partial backport, excludes Suite-B-192]
Signed-off-by: Ismael Luceno <iluceno@suse.de>
Signed-off-by: Ismael Luceno <ismael@iodev.co.uk>
---
 src/devices/wifi/nm-wifi-ap.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/devices/wifi/nm-wifi-ap.c b/src/devices/wifi/nm-wifi-ap.c
index ee7dc2360e59..7300c9213735 100644
--- a/src/devices/wifi/nm-wifi-ap.c
+++ b/src/devices/wifi/nm-wifi-ap.c
@@ -413,14 +413,19 @@ security_from_vardict (GVariant *security)
 	if (   g_variant_lookup (security, "KeyMgmt", "^a&s", &array)
 	    && array) {
 		if (g_strv_contains (array, "wpa-psk") ||
+		    g_strv_contains (array, "wpa-psk-sha256") ||
 		    g_strv_contains (array, "wpa-ft-psk"))
 			flags |= NM_802_11_AP_SEC_KEY_MGMT_PSK;
 		if (g_strv_contains (array, "wpa-eap") ||
+		    g_strv_contains (array, "wpa-eap-sha256") ||
 		    g_strv_contains (array, "wpa-ft-eap") ||
 		    g_strv_contains (array, "wpa-fils-sha256") ||
-		    g_strv_contains (array, "wpa-fils-sha384"))
+		    g_strv_contains (array, "wpa-fils-sha384") ||
+		    g_strv_contains (array, "wpa-fils-ft-sha256") ||
+		    g_strv_contains (array, "wpa-fils-ft-sha384"))
 			flags |= NM_802_11_AP_SEC_KEY_MGMT_802_1X;
-		if (g_strv_contains (array, "sae"))
+		if (g_strv_contains (array, "sae") ||
+		    g_strv_contains (array, "ft-sae"))
 			flags |= NM_802_11_AP_SEC_KEY_MGMT_SAE;
 		g_free (array);
 	}
-- 
2.36.0

openSUSE Build Service is sponsored by