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:
parent
3d86fcee07
commit
fcbdaae8a5
1 changed files with 10 additions and 0 deletions
|
@ -498,6 +498,7 @@ static const char * sae_get_password(struct hostapd_data *hapd,
|
||||||
struct sae_password_entry *pw;
|
struct sae_password_entry *pw;
|
||||||
struct sae_pt *pt = NULL;
|
struct sae_pt *pt = NULL;
|
||||||
const struct sae_pk *pk = 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) {
|
for (pw = hapd->conf->sae_passwords; pw; pw = pw->next) {
|
||||||
if (!is_broadcast_ether_addr(pw->peer_addr) &&
|
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;
|
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)
|
if (pw_entry)
|
||||||
*pw_entry = pw;
|
*pw_entry = pw;
|
||||||
if (s_pt)
|
if (s_pt)
|
||||||
|
|
Loading…
Add table
Reference in a new issue