aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ctrl_iface.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2017-11-23 23:41:50 (GMT)
committerJouni Malinen <j@w1.fi>2017-11-23 23:41:50 (GMT)
commitacc555f9e66635bdd75fdacc50feb8834d5c99b6 (patch)
tree9aecf4df543e6e469c4a654bbe14f05520b27f73 /wpa_supplicant/ctrl_iface.c
parentd722c50d0af1fef20db1c76c6ee1e40e02b7070d (diff)
downloadhostap-acc555f9e66635bdd75fdacc50feb8834d5c99b6.zip
hostap-acc555f9e66635bdd75fdacc50feb8834d5c99b6.tar.gz
hostap-acc555f9e66635bdd75fdacc50feb8834d5c99b6.tar.bz2
DPP: Allow PKEX x/X and y/Y keypairs to be overridden
This is for testing purposes to allow a test vector with specific values to be generated. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/ctrl_iface.c')
-rw-r--r--wpa_supplicant/ctrl_iface.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index ec52dd7..de9d625 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -621,6 +621,17 @@ static int wpa_supplicant_ctrl_iface_set(struct wpa_supplicant *wpa_s,
} else if (os_strcasecmp(cmd, "dpp_pkex_peer_mac_override") == 0) {
if (hwaddr_aton(value, dpp_pkex_peer_mac_override))
ret = -1;
+ } else if (os_strcasecmp(cmd, "dpp_pkex_ephemeral_key_override") == 0) {
+ size_t hex_len = os_strlen(value);
+
+ if (hex_len >
+ 2 * sizeof(dpp_pkex_ephemeral_key_override))
+ ret = -1;
+ else if (hexstr2bin(value, dpp_pkex_ephemeral_key_override,
+ hex_len / 2))
+ ret = -1;
+ else
+ dpp_pkex_ephemeral_key_override_len = hex_len / 2;
#endif /* CONFIG_DPP */
#ifdef CONFIG_TESTING_OPTIONS
} else if (os_strcasecmp(cmd, "ext_mgmt_frame_handling") == 0) {
@@ -7769,6 +7780,7 @@ static void wpa_supplicant_ctrl_iface_flush(struct wpa_supplicant *wpa_s)
wpa_s->dpp_resp_retry_time = 0;
os_memset(dpp_pkex_own_mac_override, 0, ETH_ALEN);
os_memset(dpp_pkex_peer_mac_override, 0, ETH_ALEN);
+ dpp_pkex_ephemeral_key_override_len = 0;
#endif /* CONFIG_DPP */
#ifdef CONFIG_TDLS