libnm/utils: add OWE security type

This commit is contained in:
David Bauer 2019-11-17 23:57:15 +01:00 committed by Beniamino Galvani
parent a8d5fef607
commit cb33a27f96
2 changed files with 13 additions and 0 deletions

View file

@ -1120,6 +1120,7 @@ nm_utils_ap_mode_security_valid (NMUtilsSecurityType type,
case NMU_SEC_WPA_PSK:
case NMU_SEC_WPA2_PSK:
case NMU_SEC_SAE:
case NMU_SEC_OWE:
return TRUE;
default:
break;
@ -1300,6 +1301,16 @@ nm_utils_security_valid (NMUtilsSecurityType type,
return FALSE;
}
break;
case NMU_SEC_OWE:
if (adhoc)
return FALSE;
if (!(wifi_caps & NM_WIFI_DEVICE_CAP_RSN))
return FALSE;
if (have_ap) {
if (!(ap_rsn & NM_802_11_AP_SEC_KEY_MGMT_OWE))
return FALSE;
}
break;
default:
good = FALSE;
break;

View file

@ -51,6 +51,7 @@ char * nm_utils_ssid_to_utf8 (const guint8 *ssid, gsize len);
* @NMU_SEC_WPA2_PSK: WPA2/RSN is used with Pre-Shared Keys (PSK)
* @NMU_SEC_WPA2_ENTERPRISE: WPA2 is used with 802.1x authentication
* @NMU_SEC_SAE: is used with WPA3 Enterprise
* @NMU_SEC_OWE: is used with Enhanced Open
*
* Describes generic security mechanisms that 802.11 access points may offer.
* Used with nm_utils_security_valid() for checking whether a given access
@ -67,6 +68,7 @@ typedef enum {
NMU_SEC_WPA2_PSK,
NMU_SEC_WPA2_ENTERPRISE,
NMU_SEC_SAE,
NMU_SEC_OWE,
} NMUtilsSecurityType;
gboolean nm_utils_security_valid (NMUtilsSecurityType type,