mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 00:38:24 -05:00
Add SAE to auth_alg capabilities
This makes it easier for upper layer programs to figure out whether the wpa_supplicant and and the driver supports SAE. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
4bf4e9db86
commit
db5adfe777
@ -3499,7 +3499,8 @@ static int ctrl_iface_get_capability_proto(int res, char *strict,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int ctrl_iface_get_capability_auth_alg(int res, char *strict,
|
static int ctrl_iface_get_capability_auth_alg(struct wpa_supplicant *wpa_s,
|
||||||
|
int res, char *strict,
|
||||||
struct wpa_driver_capa *capa,
|
struct wpa_driver_capa *capa,
|
||||||
char *buf, size_t buflen)
|
char *buf, size_t buflen)
|
||||||
{
|
{
|
||||||
@ -3543,6 +3544,16 @@ static int ctrl_iface_get_capability_auth_alg(int res, char *strict,
|
|||||||
pos += ret;
|
pos += ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_SAE
|
||||||
|
if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_SAE) {
|
||||||
|
ret = os_snprintf(pos, end - pos, "%sSAE",
|
||||||
|
pos == buf ? "" : " ");
|
||||||
|
if (os_snprintf_error(end - pos, ret))
|
||||||
|
return pos - buf;
|
||||||
|
pos += ret;
|
||||||
|
}
|
||||||
|
#endif /* CONFIG_SAE */
|
||||||
|
|
||||||
return pos - buf;
|
return pos - buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3741,8 +3752,8 @@ static int wpa_supplicant_ctrl_iface_get_capability(
|
|||||||
buf, buflen);
|
buf, buflen);
|
||||||
|
|
||||||
if (os_strcmp(field, "auth_alg") == 0)
|
if (os_strcmp(field, "auth_alg") == 0)
|
||||||
return ctrl_iface_get_capability_auth_alg(res, strict, &capa,
|
return ctrl_iface_get_capability_auth_alg(wpa_s, res, strict,
|
||||||
buf, buflen);
|
&capa, buf, buflen);
|
||||||
|
|
||||||
if (os_strcmp(field, "modes") == 0)
|
if (os_strcmp(field, "modes") == 0)
|
||||||
return ctrl_iface_get_capability_modes(res, strict, &capa,
|
return ctrl_iface_get_capability_modes(res, strict, &capa,
|
||||||
|
Loading…
Reference in New Issue
Block a user