aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2018-12-02 10:52:32 (GMT)
committerJouni Malinen <j@w1.fi>2018-12-02 16:40:06 (GMT)
commit24c4200d2ee5ff9cadbe29c1958d4921725e0e6d (patch)
treea91687c2826c00b23ca759d66afd972174fa1ce7 /tests
parenta7758916c67b942d7f2e91d48c4b03e5c2fada86 (diff)
downloadhostap-24c4200d2ee5ff9cadbe29c1958d4921725e0e6d.zip
hostap-24c4200d2ee5ff9cadbe29c1958d4921725e0e6d.tar.gz
hostap-24c4200d2ee5ff9cadbe29c1958d4921725e0e6d.tar.bz2
tests: DPP and PKEX with local failure in processing Commit Reveal Req
Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/test_dpp.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/hwsim/test_dpp.py b/tests/hwsim/test_dpp.py
index 203e83e..de838e7 100644
--- a/tests/hwsim/test_dpp.py
+++ b/tests/hwsim/test_dpp.py
@@ -3152,6 +3152,39 @@ def test_dpp_pkex_exchange_resp_processing_failure(dev, apdev):
raise Exception("Failed to set PKEX data (initiator)")
wait_fail_trigger(dev[1], "GET_FAIL")
+def test_dpp_pkex_commit_reveal_req_processing_failure(dev, apdev):
+ """DPP and PKEX with local failure in processing Commit Reveal Req"""
+ check_dpp_capab(dev[0])
+ check_dpp_capab(dev[1])
+
+ cmd = "DPP_BOOTSTRAP_GEN type=pkex"
+ res = dev[0].request(cmd)
+ if "FAIL" in res:
+ raise Exception("Failed to generate bootstrapping info")
+ id0 = int(res)
+
+ cmd = "DPP_BOOTSTRAP_GEN type=pkex"
+ res = dev[1].request(cmd)
+ if "FAIL" in res:
+ raise Exception("Failed to generate bootstrapping info")
+ id1 = int(res)
+
+ cmd = "DPP_PKEX_ADD own=%d identifier=test code=secret" % (id0)
+ res = dev[0].request(cmd)
+ if "FAIL" in res:
+ raise Exception("Failed to set PKEX data (responder)")
+ cmd = "DPP_LISTEN 2437"
+ if "OK" not in dev[0].request(cmd):
+ raise Exception("Failed to start listen operation")
+
+ with alloc_fail(dev[0], 1,
+ "dpp_get_pubkey_point;dpp_pkex_rx_commit_reveal_req"):
+ cmd = "DPP_PKEX_ADD own=%d identifier=test init=1 code=secret" % id1
+ res = dev[1].request(cmd)
+ if "FAIL" in res:
+ raise Exception("Failed to set PKEX data (initiator)")
+ wait_fail_trigger(dev[0], "GET_ALLOC_FAIL")
+
def test_dpp_pkex_config2(dev, apdev):
"""DPP and PKEX with responder as the configurator"""
check_dpp_capab(dev[0])