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:
<info>  [1613749711.2915] Config: added 'key_mgmt' value 'WPA-PSK WPA-PSK-SHA256 FT-PSK SAE FT-SAE'
This commit is contained in:
Beniamino Galvani 2021-02-19 16:28:44 +01:00
parent d233314ce1
commit f5d78c2d28

View file

@ -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");