aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2017-11-19 15:15:02 (GMT)
committerJouni Malinen <j@w1.fi>2017-11-19 15:15:02 (GMT)
commit4b8de0c929c90543ae3c9fb2f41ffbaa2dd3f594 (patch)
treed1c7cb187261f65ae4fb23e279df3aeebf4338e0 /wpa_supplicant
parent18b8c35b417b7b0060e97c8524938dda723dd4d7 (diff)
downloadhostap-4b8de0c929c90543ae3c9fb2f41ffbaa2dd3f594.zip
hostap-4b8de0c929c90543ae3c9fb2f41ffbaa2dd3f594.tar.gz
hostap-4b8de0c929c90543ae3c9fb2f41ffbaa2dd3f594.tar.bz2
DPP: Protocol testing for invalid Peer Discovery Req/Resp values
Extend dpp_test to allow more invalid attribute values to be written into Peer Discovery Request/Response frames. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/dpp_supplicant.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/wpa_supplicant/dpp_supplicant.c b/wpa_supplicant/dpp_supplicant.c
index 0d81d2e..41fbab8 100644
--- a/wpa_supplicant/dpp_supplicant.c
+++ b/wpa_supplicant/dpp_supplicant.c
@@ -2131,6 +2131,22 @@ skip_trans_id:
wpa_printf(MSG_INFO, "DPP: TESTING - no Connector");
goto skip_connector;
}
+ if (dpp_test == DPP_TEST_INVALID_CONNECTOR_PEER_DISC_REQ) {
+ char *connector;
+
+ wpa_printf(MSG_INFO, "DPP: TESTING - invalid Connector");
+ connector = dpp_corrupt_connector_signature(
+ ssid->dpp_connector);
+ if (!connector) {
+ wpabuf_free(msg);
+ return -1;
+ }
+ wpabuf_put_le16(msg, DPP_ATTR_CONNECTOR);
+ wpabuf_put_le16(msg, os_strlen(connector));
+ wpabuf_put_str(msg, connector);
+ os_free(connector);
+ goto skip_connector;
+ }
#endif /* CONFIG_TESTING_OPTIONS */
/* DPP Connector */