mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-31 01:04:03 -05:00
SAE-PK: Allow SAE-PK style wpa_passphrase if SAE-PK is enabled with same
This prevents use of a SAE-PK style password as the WPA-PSK passphrase only if the same password is not also enabled through sae_password for use with SAE-PK. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
844ecc70a3
commit
7ca81190a8
@ -1123,17 +1123,21 @@ const u8 * hostapd_get_psk(const struct hostapd_bss_config *conf,
|
|||||||
static bool hostapd_sae_pk_password_without_pk(struct hostapd_bss_config *bss)
|
static bool hostapd_sae_pk_password_without_pk(struct hostapd_bss_config *bss)
|
||||||
{
|
{
|
||||||
struct sae_password_entry *pw;
|
struct sae_password_entry *pw;
|
||||||
|
bool res = false;
|
||||||
|
|
||||||
if (bss->ssid.wpa_passphrase &&
|
if (bss->ssid.wpa_passphrase &&
|
||||||
sae_pk_valid_password(bss->ssid.wpa_passphrase))
|
sae_pk_valid_password(bss->ssid.wpa_passphrase))
|
||||||
return true;
|
res = true;
|
||||||
|
|
||||||
for (pw = bss->sae_passwords; pw; pw = pw->next) {
|
for (pw = bss->sae_passwords; pw; pw = pw->next) {
|
||||||
if (!pw->pk && sae_pk_valid_password(pw->password))
|
if (!pw->pk && sae_pk_valid_password(pw->password))
|
||||||
return true;
|
return true;
|
||||||
|
if (bss->ssid.wpa_passphrase && res && pw->pk &&
|
||||||
|
os_strcmp(bss->ssid.wpa_passphrase, pw->password) == 0)
|
||||||
|
res = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return res;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_SAE_PK */
|
#endif /* CONFIG_SAE_PK */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user