From b57f8d93e25a881fd392c65f58489873db0c8cad Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Mon, 16 Sep 2019 17:28:23 +0200 Subject: tui: wifi: support WPA3-Personal (SAE) --- clients/tui/nm-editor-bindings.c | 9 +++++++++ clients/tui/nmt-page-wifi.c | 2 ++ 2 files changed, 11 insertions(+) diff --git a/clients/tui/nm-editor-bindings.c b/clients/tui/nm-editor-bindings.c index 74577a253c..3ec0a8dcf7 100644 --- a/clients/tui/nm-editor-bindings.c +++ b/clients/tui/nm-editor-bindings.c @@ -592,6 +592,9 @@ get_security_type (NMEditorWirelessSecurityMethodBinding *binding) if (!strcmp (key_mgmt, "wpa-psk")) return "wpa-personal"; + if (!strcmp (key_mgmt, "sae")) + return "wpa3-personal"; + if (!strcmp (key_mgmt, "wpa-eap")) return "wpa-enterprise"; @@ -696,6 +699,12 @@ wireless_security_target_changed (GObject *object, NM_SETTING_WIRELESS_SECURITY_AUTH_ALG, NULL, NM_SETTING_WIRELESS_SECURITY_WEP_KEY_TYPE, NM_WEP_KEY_TYPE_UNKNOWN, NULL); + } else if (!strcmp (method, "wpa3-personal")) { + g_object_set (binding->s_wsec, + NM_SETTING_WIRELESS_SECURITY_KEY_MGMT, "sae", + NM_SETTING_WIRELESS_SECURITY_AUTH_ALG, NULL, + NM_SETTING_WIRELESS_SECURITY_WEP_KEY_TYPE, NM_WEP_KEY_TYPE_UNKNOWN, + NULL); } else if (!strcmp (method, "wpa-enterprise")) { g_object_set (binding->s_wsec, NM_SETTING_WIRELESS_SECURITY_KEY_MGMT, "wpa-eap", diff --git a/clients/tui/nmt-page-wifi.c b/clients/tui/nmt-page-wifi.c index ac6e1d62b6..d777dad91d 100644 --- a/clients/tui/nmt-page-wifi.c +++ b/clients/tui/nmt-page-wifi.c @@ -66,6 +66,7 @@ static NmtNewtPopupEntry wifi_band[] = { static NmtNewtPopupEntry wifi_security[] = { { NC_("Wi-Fi security", "None"), "none" }, { N_("WPA & WPA2 Personal"), "wpa-personal" }, + { N_("WPA3 Personal"), "wpa3-personal" }, { N_("WPA & WPA2 Enterprise"), "wpa-enterprise" }, { N_("WEP 40/128-bit Key (Hex or ASCII)"), "wep-key" }, { N_("WEP 128-bit Passphrase"), "wep-passphrase" }, @@ -263,6 +264,7 @@ nmt_page_wifi_constructed (GObject *object) G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL); nmt_editor_grid_append (NMT_EDITOR_GRID (subgrid), _("Password"), widget, NULL); nmt_newt_stack_add (stack, "wpa-personal", subgrid); + nmt_newt_stack_add (stack, "wpa3-personal", subgrid); /* "wpa-enterprise" */ // FIXME -- cgit v1.2.1