Blame SOURCES/0002-ce-page-security-add-SAE-support.patch

1aae59
From f57cad1d508b4f07cc39fd6f7abedd66d1fe9b50 Mon Sep 17 00:00:00 2001
c791bc
From: David Bauer <mail@david-bauer.net>
c791bc
Date: Fri, 20 Dec 2019 19:54:01 +0100
1aae59
Subject: [PATCH 2/8] ce-page-security: add SAE support
c791bc
c791bc
(cherry picked from commit 2e79c531942cf88051498c962116c010835ab7e1)
c791bc
---
c791bc
 .../connection-editor/ce-page-security.c      | 23 +++++++++++++++++++
c791bc
 1 file changed, 23 insertions(+)
c791bc
c791bc
diff --git a/panels/network/connection-editor/ce-page-security.c b/panels/network/connection-editor/ce-page-security.c
c791bc
index d06e3aeb1..5104d7442 100644
c791bc
--- a/panels/network/connection-editor/ce-page-security.c
c791bc
+++ b/panels/network/connection-editor/ce-page-security.c
c791bc
@@ -68,6 +68,11 @@ get_default_type_for_security (NMSettingWirelessSecurity *sec)
c791bc
                         return NMU_SEC_LEAP;
c791bc
                 return NMU_SEC_DYNAMIC_WEP;
c791bc
         }
c791bc
+#if NM_CHECK_VERSION(1,20,6)
c791bc
+        if (!strcmp (key_mgmt, "sae")) {
c791bc
+                return NMU_SEC_SAE;
c791bc
+        }
c791bc
+#endif
c791bc
 
c791bc
         if (   !strcmp (key_mgmt, "wpa-none")
c791bc
             || !strcmp (key_mgmt, "wpa-psk")) {
c791bc
@@ -336,6 +341,21 @@ finish_setup (CEPageSecurity *page)
c791bc
                 }
c791bc
         }
c791bc
 
c791bc
+#if NM_CHECK_VERSION(1,20,6)
c791bc
+        if (nm_utils_security_valid (NMU_SEC_SAE, dev_caps, FALSE, is_adhoc, 0, 0, 0)) {
c791bc
+                WirelessSecurityWPAPSK *ws_wpa_psk;
c791bc
+
c791bc
+                ws_wpa_psk = ws_wpa_psk_new (connection, FALSE);
c791bc
+                if (ws_wpa_psk) {
c791bc
+                        add_security_item (page, WIRELESS_SECURITY (ws_wpa_psk), sec_model,
c791bc
+                                           &iter, _("WPA3 Personal"), FALSE);
c791bc
+                        if ((active < 0) && ((default_type == NMU_SEC_SAE)))
c791bc
+                                active = item;
c791bc
+                        item++;
c791bc
+                }
c791bc
+        }
c791bc
+#endif
c791bc
+
c791bc
         gtk_combo_box_set_model (combo, GTK_TREE_MODEL (sec_model));
c791bc
         gtk_cell_layout_clear (GTK_CELL_LAYOUT (combo));
c791bc
 
c791bc
@@ -451,6 +471,9 @@ ce_page_security_new (NMConnection      *connection,
c791bc
         if (default_type == NMU_SEC_STATIC_WEP ||
c791bc
             default_type == NMU_SEC_LEAP ||
c791bc
             default_type == NMU_SEC_WPA_PSK ||
c791bc
+#if NM_CHECK_VERSION(1,20,6)
c791bc
+	    default_type == NMU_SEC_SAE ||
c791bc
+#endif
c791bc
             default_type == NMU_SEC_WPA2_PSK) {
c791bc
                 CE_PAGE (page)->security_setting = NM_SETTING_WIRELESS_SECURITY_SETTING_NAME;
c791bc
         }
c791bc
-- 
1aae59
2.34.1
c791bc