aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2017-11-30 19:56:19 (GMT)
committerJouni Malinen <j@w1.fi>2017-11-30 19:56:19 (GMT)
commit55c6c8585579af64fff3f88d45931ce72d73ce7d (patch)
tree6c29d40d545445717a1dcced30e0d101174b254e
parent364039d22359495b87a0600150b26dc70d516a7c (diff)
downloadhostap-55c6c8585579af64fff3f88d45931ce72d73ce7d.zip
hostap-55c6c8585579af64fff3f88d45931ce72d73ce7d.tar.gz
hostap-55c6c8585579af64fff3f88d45931ce72d73ce7d.tar.bz2
DPP: Extend dpp_test with invalid Transaction ID in Peer Disc Req
Allow a Transaction ID attribute with invalid length to be sent for protocol testing purposes. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
-rw-r--r--src/common/dpp.h1
-rw-r--r--wpa_supplicant/dpp_supplicant.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/src/common/dpp.h b/src/common/dpp.h
index b2b9761..6ee3bee 100644
--- a/src/common/dpp.h
+++ b/src/common/dpp.h
@@ -323,6 +323,7 @@ enum dpp_test_behavior {
DPP_TEST_INVALID_CONNECTOR_PEER_DISC_RESP = 79,
DPP_TEST_INVALID_CONNECTOR_PEER_DISC_REQ = 80,
DPP_TEST_INVALID_I_NONCE_AUTH_REQ = 81,
+ DPP_TEST_INVALID_TRANSACTION_ID_PEER_DISC_REQ = 82,
};
extern enum dpp_test_behavior dpp_test;
diff --git a/wpa_supplicant/dpp_supplicant.c b/wpa_supplicant/dpp_supplicant.c
index a6b1a58..42c1028 100644
--- a/wpa_supplicant/dpp_supplicant.c
+++ b/wpa_supplicant/dpp_supplicant.c
@@ -2268,6 +2268,12 @@ int wpas_dpp_check_connect(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
wpa_printf(MSG_INFO, "DPP: TESTING - no Transaction ID");
goto skip_trans_id;
}
+ if (dpp_test == DPP_TEST_INVALID_TRANSACTION_ID_PEER_DISC_REQ) {
+ wpa_printf(MSG_INFO, "DPP: TESTING - invalid Transaction ID");
+ wpabuf_put_le16(msg, DPP_ATTR_TRANSACTION_ID);
+ wpabuf_put_le16(msg, 0);
+ goto skip_trans_id;
+ }
#endif /* CONFIG_TESTING_OPTIONS */
/* Transaction ID */