From 06cdd1cd79b16fe9b40823b113d1e69ea6155cc0 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 1 Aug 2015 21:22:43 +0300 Subject: [PATCH] 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 --- tests/hwsim/test_ap_eap.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/hwsim/test_ap_eap.py b/tests/hwsim/test_ap_eap.py index 0b1abbf95..8048636c2 100644 --- a/tests/hwsim/test_ap_eap.py +++ b/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: