aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@codeaurora.org>2019-06-03 17:25:56 (GMT)
committerJouni Malinen <jouni@codeaurora.org>2019-06-03 17:27:43 (GMT)
commitfe40c679d22b330a0fb9b35d9236666d9b364306 (patch)
tree6acd8841bb4fce639addb54cbd314b79acd830ce
parent236f132c54aaf2ece66e42f4dbd26b4972906c10 (diff)
downloadhostap-fe40c679d22b330a0fb9b35d9236666d9b364306.zip
hostap-fe40c679d22b330a0fb9b35d9236666d9b364306.tar.gz
hostap-fe40c679d22b330a0fb9b35d9236666d9b364306.tar.bz2
tests: Fix EAP-FAST protocol testing with older OpenSSL library versions
Looks like the previous fix for a newer OpenSSL versions broke functionality with older versions that did not seem to like @SECLEVEL=0 in the cipher list. Make that addition conditional on OpenSSL version to work with both versions. Fixes: e87e6f609bb1 ("tests: Fix EAP-FAST protocol testing with newer OpenSSL and pyOpenSSL") Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
-rw-r--r--tests/hwsim/test_eap_proto.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/hwsim/test_eap_proto.py b/tests/hwsim/test_eap_proto.py
index db30594..7aeaf96 100644
--- a/tests/hwsim/test_eap_proto.py
+++ b/tests/hwsim/test_eap_proto.py
@@ -10110,7 +10110,10 @@ def run_eap_fast_phase2(dev, test_payload, test_failure=True):
ctx['sslctx'] = OpenSSL.SSL.Context(OpenSSL.SSL.TLSv1_METHOD)
ctx['sslctx'].set_info_callback(ssl_info_callback)
ctx['sslctx'].load_tmp_dh("auth_serv/dh.conf")
- ctx['sslctx'].set_cipher_list("ADH-AES128-SHA:@SECLEVEL=0")
+ if OpenSSL.SSL.OPENSSL_VERSION_NUMBER >= 0x10100000:
+ ctx['sslctx'].set_cipher_list("ADH-AES128-SHA:@SECLEVEL=0")
+ else:
+ ctx['sslctx'].set_cipher_list("ADH-AES128-SHA")
ctx['conn'] = OpenSSL.SSL.Connection(ctx['sslctx'], None)
ctx['conn'].set_accept_state()
log_conn_state(ctx['conn'])