aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/mesh_rsn.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2017-10-11 20:09:16 (GMT)
committerJouni Malinen <j@w1.fi>2017-10-11 20:24:19 (GMT)
commita34ca59e4db0df63034fed4def121eaecc65bfa7 (patch)
tree1168ebf27bc4b26fbd4284d5fdedab41b3d6b78b /wpa_supplicant/mesh_rsn.c
parent2377c1caef77c9c309681ad419b87cafc1c10e28 (diff)
downloadhostap-a34ca59e4db0df63034fed4def121eaecc65bfa7.zip
hostap-a34ca59e4db0df63034fed4def121eaecc65bfa7.tar.gz
hostap-a34ca59e4db0df63034fed4def121eaecc65bfa7.tar.bz2
SAE: Allow SAE password to be configured separately (STA)
The new sae_password network profile parameter can now be used to set the SAE password instead of the previously used psk parameter. This allows shorter than 8 characters and longer than 63 characters long passwords to be used. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/mesh_rsn.c')
-rw-r--r--wpa_supplicant/mesh_rsn.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/wpa_supplicant/mesh_rsn.c b/wpa_supplicant/mesh_rsn.c
index 90137c4..25dcde5 100644
--- a/wpa_supplicant/mesh_rsn.c
+++ b/wpa_supplicant/mesh_rsn.c
@@ -317,7 +317,12 @@ static int mesh_rsn_build_sae_commit(struct wpa_supplicant *wpa_s,
struct wpa_ssid *ssid,
struct sta_info *sta)
{
- if (ssid->passphrase == NULL) {
+ const char *password;
+
+ password = ssid->sae_password;
+ if (!password)
+ password = ssid->passphrase;
+ if (!password) {
wpa_msg(wpa_s, MSG_DEBUG, "SAE: No password available");
return -1;
}
@@ -328,8 +333,8 @@ static int mesh_rsn_build_sae_commit(struct wpa_supplicant *wpa_s,
}
return sae_prepare_commit(wpa_s->own_addr, sta->addr,
- (u8 *) ssid->passphrase,
- os_strlen(ssid->passphrase), sta->sae);
+ (u8 *) password, os_strlen(password),
+ sta->sae);
}