aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/sme.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/sme.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/sme.c')
-rw-r--r--wpa_supplicant/sme.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
index c14433a..8b35f16 100644
--- a/wpa_supplicant/sme.c
+++ b/wpa_supplicant/sme.c
@@ -87,6 +87,7 @@ static struct wpabuf * sme_auth_build_sae_commit(struct wpa_supplicant *wpa_s,
{
struct wpabuf *buf;
size_t len;
+ const char *password;
#ifdef CONFIG_TESTING_OPTIONS
if (wpa_s->sae_commit_override) {
@@ -101,7 +102,10 @@ static struct wpabuf * sme_auth_build_sae_commit(struct wpa_supplicant *wpa_s,
}
#endif /* CONFIG_TESTING_OPTIONS */
- if (ssid->passphrase == NULL) {
+ password = ssid->sae_password;
+ if (!password)
+ password = ssid->passphrase;
+ if (!password) {
wpa_printf(MSG_DEBUG, "SAE: No password available");
return NULL;
}
@@ -112,8 +116,7 @@ static struct wpabuf * sme_auth_build_sae_commit(struct wpa_supplicant *wpa_s,
}
if (sae_prepare_commit(wpa_s->own_addr, bssid,
- (u8 *) ssid->passphrase,
- os_strlen(ssid->passphrase),
+ (u8 *) password, os_strlen(password),
&wpa_s->sme.sae) < 0) {
wpa_printf(MSG_DEBUG, "SAE: Could not pick PWE");
return NULL;