]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Fix eap_proto_ttls_errors with CONFIG_TLS=internal
authorJouni Malinen <j@w1.fi>
Sun, 26 Jan 2020 15:09:50 +0000 (17:09 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 26 Jan 2020 15:09:50 +0000 (17:09 +0200)
Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_eap_proto.py

index ece527aba155488b1f30104b0dbb5169762742b3..59519bd6b1b68a3b0d2c0e3d01abebfbd6a59d04 100644 (file)
@@ -8947,10 +8947,15 @@ def test_eap_proto_ttls_errors(dev, apdev):
               "user", "autheap=MSCHAPV2"),
              (1, "eap_msg_alloc;eap_peer_tls_build_ack",
               "user", "autheap=MSCHAPV2"),
-             (1, "tls_connection_decrypt;eap_peer_tls_decrypt",
-              "user", "autheap=MSCHAPV2"),
              (1, "eap_peer_tls_phase2_nak;eap_ttls_phase2_request_eap_method",
               "cert user", "autheap=MSCHAPV2")]
+    tls = dev[0].request("GET tls_library")
+    if tls.startswith("internal"):
+        tests += [(1, "tlsv1_client_decrypt;eap_peer_tls_decrypt",
+                   "user", "autheap=MSCHAPV2")]
+    else:
+        tests += [(1, "tls_connection_decrypt;eap_peer_tls_decrypt",
+                   "user", "autheap=MSCHAPV2")]
     for count, func, identity, phase2 in tests:
         with alloc_fail(dev[0], count, func):
             dev[0].connect("eap-test", key_mgmt="WPA-EAP", scan_freq="2412",