From f5d78c2d289c9e4a4c247d2520c7c3e2baf537c8 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Fri, 19 Feb 2021 16:28:44 +0100 Subject: [PATCH] supplicant: enable WPA3 for WPA-PSK connections A connection with key-mgmt=wpa-psk should be able to connect to WPA, WPA2 and WPA3 APs, choosing the best candidate automatically. Also pass SAE (WPA3) key-mgmt to wpa_supplicant when it is supported. For example, I now get this when connecting to a WPA2 network: [1613749711.2915] Config: added 'key_mgmt' value 'WPA-PSK WPA-PSK-SHA256 FT-PSK SAE FT-SAE' --- src/core/supplicant/nm-supplicant-config.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/supplicant/nm-supplicant-config.c b/src/core/supplicant/nm-supplicant-config.c index 9a77d03e6f..cd0e99c6d7 100644 --- a/src/core/supplicant/nm-supplicant-config.c +++ b/src/core/supplicant/nm-supplicant-config.c @@ -841,6 +841,11 @@ nm_supplicant_config_add_setting_wireless_security(NMSupplicantConfig * g_string_append(key_mgmt_conf, " wpa-psk-sha256"); if (_get_capability(priv, NM_SUPPL_CAP_TYPE_FT)) g_string_append(key_mgmt_conf, " ft-psk"); + if (_get_capability(priv, NM_SUPPL_CAP_TYPE_SAE)) { + g_string_append(key_mgmt_conf, " sae"); + if (_get_capability(priv, NM_SUPPL_CAP_TYPE_FT)) + g_string_append(key_mgmt_conf, " ft-sae"); + } } else if (nm_streq(key_mgmt, "wpa-eap")) { if (_get_capability(priv, NM_SUPPL_CAP_TYPE_PMF)) { g_string_append(key_mgmt_conf, " wpa-eap-sha256");