aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2017-11-22 19:22:23 (GMT)
committerJouni Malinen <j@w1.fi>2017-11-22 19:24:08 (GMT)
commite3a5882b3e82acdd7228950916cb592712f4b998 (patch)
treeb0f2b3ceb7a444d00e9057babe274235cc63f9f1 /wpa_supplicant
parent5dd745b73871c1c40127177b56890716b19f1cd0 (diff)
downloadhostap-e3a5882b3e82acdd7228950916cb592712f4b998.zip
hostap-e3a5882b3e82acdd7228950916cb592712f4b998.tar.gz
hostap-e3a5882b3e82acdd7228950916cb592712f4b998.tar.bz2
DPP: Add SAE credential support to Configurator
The new conf={sta,ap}-{sae,psk-sae} parameter values can now be used to specify that the legacy configuration object is for SAE. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/dpp_supplicant.c26
1 files changed, 20 insertions, 6 deletions
diff --git a/wpa_supplicant/dpp_supplicant.c b/wpa_supplicant/dpp_supplicant.c
index c20891c..bc986fc 100644
--- a/wpa_supplicant/dpp_supplicant.c
+++ b/wpa_supplicant/dpp_supplicant.c
@@ -536,8 +536,15 @@ static void wpas_dpp_set_configurator(struct wpa_supplicant *wpa_s,
goto fail;
os_memcpy(conf_sta->ssid, ssid, ssid_len);
conf_sta->ssid_len = ssid_len;
- if (os_strstr(cmd, " conf=sta-psk")) {
- conf_sta->dpp = 0;
+ if (os_strstr(cmd, " conf=sta-psk") ||
+ os_strstr(cmd, " conf=sta-sae") ||
+ os_strstr(cmd, " conf=sta-psk-sae")) {
+ if (os_strstr(cmd, " conf=sta-psk-sae"))
+ conf_sta->akm = DPP_AKM_PSK_SAE;
+ else if (os_strstr(cmd, " conf=sta-sae"))
+ conf_sta->akm = DPP_AKM_SAE;
+ else
+ conf_sta->akm = DPP_AKM_PSK;
if (psk_set) {
os_memcpy(conf_sta->psk, psk, PMK_LEN);
} else {
@@ -546,7 +553,7 @@ static void wpas_dpp_set_configurator(struct wpa_supplicant *wpa_s,
goto fail;
}
} else if (os_strstr(cmd, " conf=sta-dpp")) {
- conf_sta->dpp = 1;
+ conf_sta->akm = DPP_AKM_DPP;
} else {
goto fail;
}
@@ -558,8 +565,15 @@ static void wpas_dpp_set_configurator(struct wpa_supplicant *wpa_s,
goto fail;
os_memcpy(conf_ap->ssid, ssid, ssid_len);
conf_ap->ssid_len = ssid_len;
- if (os_strstr(cmd, " conf=ap-psk")) {
- conf_ap->dpp = 0;
+ if (os_strstr(cmd, " conf=ap-psk") ||
+ os_strstr(cmd, " conf=ap-sae") ||
+ os_strstr(cmd, " conf=ap-psk-sae")) {
+ if (os_strstr(cmd, " conf=ap-psk-sae"))
+ conf_ap->akm = DPP_AKM_PSK_SAE;
+ else if (os_strstr(cmd, " conf=ap-sae"))
+ conf_ap->akm = DPP_AKM_SAE;
+ else
+ conf_ap->akm = DPP_AKM_PSK;
if (psk_set) {
os_memcpy(conf_ap->psk, psk, PMK_LEN);
} else {
@@ -568,7 +582,7 @@ static void wpas_dpp_set_configurator(struct wpa_supplicant *wpa_s,
goto fail;
}
} else if (os_strstr(cmd, " conf=ap-dpp")) {
- conf_ap->dpp = 1;
+ conf_ap->akm = DPP_AKM_DPP;
} else {
goto fail;
}