aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2017-12-05 21:49:55 (GMT)
committerJouni Malinen <j@w1.fi>2017-12-05 21:53:08 (GMT)
commitf55269753c2bbdcc8a003350fdec5f0283863d7f (patch)
treef02b5b1fd405d77c4623c369628594d21b71621c /wpa_supplicant
parent33cddd7fe9888fc964a5257592b0703833ff424c (diff)
downloadhostap-f55269753c2bbdcc8a003350fdec5f0283863d7f.zip
hostap-f55269753c2bbdcc8a003350fdec5f0283863d7f.tar.gz
hostap-f55269753c2bbdcc8a003350fdec5f0283863d7f.tar.bz2
DPP: Allow protocol key to be overridden for testing purposes
This can be used for various testing needs. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/ctrl_iface.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index a6d41e4..2069be5 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -633,6 +633,16 @@ static int wpa_supplicant_ctrl_iface_set(struct wpa_supplicant *wpa_s,
ret = -1;
else
dpp_pkex_ephemeral_key_override_len = hex_len / 2;
+ } else if (os_strcasecmp(cmd, "dpp_protocol_key_override") == 0) {
+ size_t hex_len = os_strlen(value);
+
+ if (hex_len > 2 * sizeof(dpp_protocol_key_override))
+ ret = -1;
+ else if (hexstr2bin(value, dpp_protocol_key_override,
+ hex_len / 2))
+ ret = -1;
+ else
+ dpp_protocol_key_override_len = hex_len / 2;
#endif /* CONFIG_TESTING_OPTIONS */
#endif /* CONFIG_DPP */
#ifdef CONFIG_TESTING_OPTIONS
@@ -7784,6 +7794,7 @@ static void wpa_supplicant_ctrl_iface_flush(struct wpa_supplicant *wpa_s)
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;
+ dpp_protocol_key_override_len = 0;
#endif /* CONFIG_TESTING_OPTIONS */
#endif /* CONFIG_DPP */