unsigned int transition_mode_ssid_len;
unsigned char transition_mode_bssid[6];
unsigned char transition_mode_ssid[32];
+ dbus_bool_t pmf_required;
#endif
};
if ((ssid->security == G_SUPPLICANT_SECURITY_WEP ||
ssid->security == G_SUPPLICANT_SECURITY_PSK ||
+#if defined TIZEN_EXT
+ ssid->security == G_SUPPLICANT_SECURITY_SAE ||
+#endif
ssid->security == G_SUPPLICANT_SECURITY_NONE) &&
ssid->passphrase) {
interface->network_info.passphrase = g_strdup(ssid->passphrase);
return network->country_code;
}
+
+dbus_bool_t g_supplicant_network_is_pmf_required(GSupplicantNetwork *network)
+{
+ if (!network)
+ return 0;
+
+ return network->best_bss->pmf_required;
+}
#endif
const unsigned char *g_supplicant_peer_get_widi_ies(GSupplicantPeer *peer,
unsigned char *ext_rates = NULL;
unsigned int max_rate = 0;
unsigned int max_ext_rate = 0;
+ unsigned int offset = 0;
bool ht = false;
bool vht = false;
#endif
#if defined TIZEN_EXT
#define VENDOR_SPECIFIC_INFO 0xDD
#define WLAN_EID_COUNTRY 7
+#define WLAN_EID_RSN_INFO 48
+#define RSN_CAPABILITY_MFP_REQ (1 << 6)
#endif
dbus_message_iter_recurse(iter, &array);
unsigned char *vsie;
int vsie_len = 0;
- if(ie[0] == VENDOR_SPECIFIC_INFO && memcmp(ie+2, OWE_WFA_OUI, sizeof(OWE_WFA_OUI)) == 0) {
+ if (ie[0] == VENDOR_SPECIFIC_INFO && memcmp(ie+2, OWE_WFA_OUI, sizeof(OWE_WFA_OUI)) == 0) {
SUPPLICANT_DBG("IE: match vendor specific data : OWE Transition Mode");
/*
continue;
}
- if(ie[0] == VENDOR_SPECIFIC_INFO && memcmp(ie+2, WPS_OUI, sizeof(WPS_OUI)) != 0) {
+ if (ie[0] == VENDOR_SPECIFIC_INFO && memcmp(ie+2, WPS_OUI, sizeof(WPS_OUI)) != 0) {
if (!simplified_log)
SUPPLICANT_DBG("IE: match vendor specific data");
continue;
}
- if(ie[0] == WLAN_EID_COUNTRY && ie[1] >= 2) {
+ if (ie[0] == WLAN_EID_COUNTRY && ie[1] >= 2) {
/* Add country code only if it is a valid alphabet */
if (ie[2] >= 65 && ie[2] <= 90 && ie[3] >= 65 && ie[3] <= 90) {
memcpy(bss->country_code, ie+2, COUNTRY_CODE_LENGTH);
}
continue;
}
+
+ if (ie[0] == WLAN_EID_RSN_INFO && ie[1] >= 20) {
+ r_len = ie[1];
+ offset = 10 + ie[8] * 4;
+ offset += ie[offset] * 4 + 2;
+
+ if (offset <= r_len + 1 &&
+ (ie[offset] & RSN_CAPABILITY_MFP_REQ) != 0)
+ bss->pmf_required = TRUE;
+
+ continue;
+ }
#endif
if (ie[0] != WMM_WPA1_WPS_INFO || ie[1] < WPS_INFO_MIN_LEN ||
memcmp(ie+2, WPS_OUI, sizeof(WPS_OUI)) != 0)
regdom->callback(result, regdom->alpha2,
(void *) regdom->user_data);
- dbus_free(regdom);
+ g_free(regdom);
}
static void country_params(DBusMessageIter *iter, void *user_data)
SUPPLICANT_DBG("");
if (error) {
- g_message("error %s", error);
+ g_warning("error %s", error);
err = -EIO;
goto done;
}
if (!ssid->private_key_path)
return;
-#if !defined TIZEN_EXT
if (!ssid->private_key_passphrase)
return;
-#endif
if (ssid->ca_cert_path)
supplicant_dbus_dict_append_basic(dict, "ca_cert",
supplicant_dbus_dict_append_basic(dict, "private_key",
DBUS_TYPE_STRING,
&ssid->private_key_path);
-#if !defined TIZEN_EXT
supplicant_dbus_dict_append_basic(dict, "private_key_passwd",
DBUS_TYPE_STRING,
&ssid->private_key_passphrase);
-#endif
supplicant_dbus_dict_append_basic(dict, "client_cert",
DBUS_TYPE_STRING,
&ssid->client_cert_path);