]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Speed up suite_b_192_rsa_insufficient_dh in failure case
authorJouni Malinen <j@w1.fi>
Thu, 28 Dec 2017 18:26:57 +0000 (20:26 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 28 Dec 2017 20:33:12 +0000 (22:33 +0200)
Check for unexpected connection to avoid timeout on TLS alert event if
the implementation does not check DH key size at all.

Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_suite_b.py

index f96a676da5424626811b7b497487c1f96d16e55e..46401a32812f4f11711bed0c8e0bfb34175cc5bd 100644 (file)
@@ -422,11 +422,14 @@ def test_suite_b_192_rsa_insufficient_dh(dev, apdev):
                    private_key="auth_serv/rsa3072-user.key",
                    pairwise="GCMP-256", group="GCMP-256", scan_freq="2412",
                    wait_connect=False)
-    ev = dev[0].wait_event(["CTRL-EVENT-EAP-STATUS status='local TLS alert'"],
+    ev = dev[0].wait_event(["CTRL-EVENT-EAP-STATUS status='local TLS alert'",
+                            "CTRL-EVENT-CONNECTED"],
                            timeout=10)
     dev[0].request("DISCONNECT")
     if ev is None:
         raise Exception("DH error not reported")
+    if "CTRL-EVENT-CONNECTED" in ev:
+        raise Exception("Unexpected connection")
     if "insufficient security" not in ev and "internal error" not in ev:
         raise Exception("Unexpected error reason: " + ev)