Browse Source

tests: Allow FIPS error case for openssl_cipher_suite_config_wpas

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>
Jouni Malinen 9 years ago
parent
commit
06cdd1cd79
1 changed files with 6 additions and 1 deletions
  1. 6 1
      tests/hwsim/test_ap_eap.py

+ 6 - 1
tests/hwsim/test_ap_eap.py

@@ -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: