]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: DPP protocol testing - Auth Conf RX processing failure
authorJouni Malinen <jouni@codeaurora.org>
Fri, 30 Nov 2018 12:21:35 +0000 (14:21 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 30 Nov 2018 12:21:35 +0000 (14:21 +0200)
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
tests/hwsim/test_dpp.py

index 6c0d64b899f23479fc5da5f2e98d6d800ed18f99..1928c2fb0207343c4be7a1411db844619b39bb93 100644 (file)
@@ -4113,6 +4113,26 @@ def test_dpp_proto_auth_resp_r_auth_mismatch(dev, apdev):
     if "Peer reported authentication failure" not in ev:
         raise Exception("Unexpected failure: " + ev)
 
+def test_dpp_proto_auth_resp_r_auth_mismatch_failure(dev, apdev):
+    """DPP protocol testing - Auth Conf RX processing failure"""
+    with alloc_fail(dev[0], 1, "dpp_auth_conf_rx_failure"):
+        run_dpp_proto_init(dev, 0, 32, mutual=True)
+        ev = dev[0].wait_event(["DPP-FAIL"], timeout=5)
+        if ev is None:
+            raise Exception("DPP failure not seen")
+        if "Authentication failed" not in ev:
+            raise Exception("Unexpected failure: " + ev)
+
+def test_dpp_proto_auth_resp_r_auth_mismatch_failure2(dev, apdev):
+    """DPP protocol testing - Auth Conf RX processing failure 2"""
+    with fail_test(dev[0], 1, "dpp_auth_conf_rx_failure"):
+        run_dpp_proto_init(dev, 0, 32, mutual=True)
+        ev = dev[0].wait_event(["DPP-FAIL"], timeout=5)
+        if ev is None:
+            raise Exception("DPP failure not seen")
+        if "AES-SIV decryption failed" not in ev:
+            raise Exception("Unexpected failure: " + ev)
+
 def run_dpp_proto_auth_conf_missing(dev, test, reason):
     run_dpp_proto_init(dev, 1, test, mutual=True)
     if reason is None: