mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
Interworking: Enforce WPA2-Enterprise/CCMP
Since we currently support only HS 2.0 networks with Interworking network selection, enforce that WPA2-Enterprise/CCMP is used on the AP instead of allowing any WPA-Enterprise combination. Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
4ed34f5acd
commit
8601b50312
@ -624,6 +624,18 @@ static int set_root_nai(struct wpa_ssid *ssid, const char *imsi, char prefix)
|
||||
#endif /* INTERWORKING_3GPP */
|
||||
|
||||
|
||||
static int interworking_set_hs20_params(struct wpa_ssid *ssid)
|
||||
{
|
||||
if (wpa_config_set(ssid, "key_mgmt", "WPA-EAP", 0) < 0)
|
||||
return -1;
|
||||
if (wpa_config_set(ssid, "proto", "RSN", 0) < 0)
|
||||
return -1;
|
||||
if (wpa_config_set(ssid, "pairwise", "CCMP", 0) < 0)
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int interworking_connect_3gpp(struct wpa_supplicant *wpa_s,
|
||||
struct wpa_bss *bss)
|
||||
{
|
||||
@ -689,7 +701,7 @@ static int interworking_connect_3gpp(struct wpa_supplicant *wpa_s,
|
||||
os_memcpy(ssid->ssid, ie + 2, ie[1]);
|
||||
ssid->ssid_len = ie[1];
|
||||
|
||||
if (wpa_config_set(ssid, "key_mgmt", "WPA-EAP", 0) < 0)
|
||||
if (interworking_set_hs20_params(ssid) < 0)
|
||||
goto fail;
|
||||
|
||||
/* TODO: figure out whether to use EAP-SIM, EAP-AKA, or EAP-AKA' */
|
||||
@ -956,7 +968,7 @@ static int interworking_connect_roaming_consortium(
|
||||
os_memcpy(ssid->ssid, ssid_ie + 2, ssid_ie[1]);
|
||||
ssid->ssid_len = ssid_ie[1];
|
||||
|
||||
if (wpa_config_set(ssid, "key_mgmt", "WPA-EAP", 0) < 0)
|
||||
if (interworking_set_hs20_params(ssid) < 0)
|
||||
goto fail;
|
||||
|
||||
if (cred->eap_method == NULL) {
|
||||
@ -1059,7 +1071,7 @@ int interworking_connect(struct wpa_supplicant *wpa_s, struct wpa_bss *bss)
|
||||
os_memcpy(ssid->ssid, ie + 2, ie[1]);
|
||||
ssid->ssid_len = ie[1];
|
||||
|
||||
if (wpa_config_set(ssid, "key_mgmt", "WPA-EAP", 0) < 0)
|
||||
if (interworking_set_hs20_params(ssid) < 0)
|
||||
goto fail;
|
||||
|
||||
if (wpa_config_set(ssid, "eap", eap_get_name(EAP_VENDOR_IETF,
|
||||
|
Loading…
Reference in New Issue
Block a user