tests: Allow FIPS error case for openssl_cipher_suite_config_wpas
authorJouni Malinen <j@w1.fi>
Sat, 1 Aug 2015 18:22:43 +0000 (21:22 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 2 Aug 2015 13:52:56 +0000 (16:52 +0300)
OpenSSL rejects the cipher string 'EXPORT' in FIPS mode in a way that
results in the locally generated error showing up before the EAP method
has been accepted.

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

index 0b1abbf..8048636 100644 (file)
@@ -87,9 +87,14 @@ def eap_check_auth(dev, method, initial, rsn=True, sha256=False,
     ev = dev.wait_event(["CTRL-EVENT-EAP-STARTED"], timeout=10)
     if ev is None:
         raise Exception("Association and EAP start timed out")
-    ev = dev.wait_event(["CTRL-EVENT-EAP-METHOD"], timeout=10)
+    ev = dev.wait_event(["CTRL-EVENT-EAP-METHOD",
+                         "CTRL-EVENT-EAP-FAILURE"], timeout=10)
     if ev is None:
         raise Exception("EAP method selection timed out")
+    if "CTRL-EVENT-EAP-FAILURE" in ev:
+        if maybe_local_error:
+            return
+        raise Exception("Could not select EAP method")
     if method not in ev:
         raise Exception("Unexpected EAP method")
     if expect_failure: