diff --git a/tests/hwsim/test_eap_proto.py b/tests/hwsim/test_eap_proto.py index db30594eb..7aeaf968c 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'])