SAE: Add support for RADIUS passphrase as the SAE password

Allow the first Tunnel-Password RADIUS entry to be used for SAE in
addition to the sae_password entries and wpa_passphrase parameters from
the static configuration file.

Signed-off-by: Mario Hros <git@reversity.org>
This commit is contained in:
Mario Hros 2022-02-19 21:25:30 +01:00 committed by Jouni Malinen
parent 3d86fcee07
commit fcbdaae8a5

View file

@ -498,6 +498,7 @@ static const char * sae_get_password(struct hostapd_data *hapd,
struct sae_password_entry *pw;
struct sae_pt *pt = NULL;
const struct sae_pk *pk = NULL;
struct hostapd_sta_wpa_psk_short *psk = NULL;
for (pw = hapd->conf->sae_passwords; pw; pw = pw->next) {
if (!is_broadcast_ether_addr(pw->peer_addr) &&
@ -519,6 +520,15 @@ static const char * sae_get_password(struct hostapd_data *hapd,
pt = hapd->conf->ssid.pt;
}
if (!password) {
for (psk = sta->psk; psk; psk = psk->next) {
if (psk->is_passphrase) {
password = psk->passphrase;
break;
}
}
}
if (pw_entry)
*pw_entry = pw;
if (s_pt)