[PATCH] SAE: Add support for RADIUS passphrase

Mario Hros git at reversity.org
Sun Feb 13 08:26:07 PST 2022


Allow the first Tunneled-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 at reversity.org>
---
src/ap/ieee802_11.c | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index 6140a492c..bcefe57ed 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -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)
-- 
2.34.1






More information about the Hostap mailing list