SAE: Add support for using the optional Password Identifier

This extends the SAE implementation in both infrastructure and mesh BSS
cases to allow an optional Password Identifier to be used. This uses the
mechanism added in P802.11REVmd/D1.0. The Password Identifier is
configured in a wpa_supplicant network profile as a new string parameter
sae_password_id. In hostapd configuration, the existing sae_password
parameter has been extended to allow the password identifier (and also a
peer MAC address) to be set. In addition, multiple sae_password entries
can now be provided to hostapd to allow multiple per-peer and
per-identifier passwords to be set.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
Jouni Malinen 2018-05-19 17:28:01 +03:00 committed by Jouni Malinen
parent d6a65a83fb
commit 9be19d0b9c
18 changed files with 365 additions and 61 deletions

View file

@ -481,6 +481,22 @@ static void hostapd_config_free_fils_realms(struct hostapd_bss_config *conf)
}
static void hostapd_config_free_sae_passwords(struct hostapd_bss_config *conf)
{
struct sae_password_entry *pw, *tmp;
pw = conf->sae_passwords;
conf->sae_passwords = NULL;
while (pw) {
tmp = pw;
pw = pw->next;
str_clear_free(tmp->password);
os_free(tmp->identifier);
os_free(tmp);
}
}
void hostapd_config_free_bss(struct hostapd_bss_config *conf)
{
if (conf == NULL)
@ -658,7 +674,7 @@ void hostapd_config_free_bss(struct hostapd_bss_config *conf)
wpabuf_free(conf->dpp_csign);
#endif /* CONFIG_DPP */
os_free(conf->sae_password);
hostapd_config_free_sae_passwords(conf);
os_free(conf);
}