]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Check for TLS EC support in build
authorJouni Malinen <j@w1.fi>
Sun, 26 Jan 2020 14:54:07 +0000 (16:54 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 26 Jan 2020 14:54:07 +0000 (16:54 +0200)
These test cases need to be skipped with CONFIG_TLS=internal.

Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_ap_eap.py

index f502bf7a7198428d71c972a7d2be91579d1a1f61..64acae9d089518a2d9a0f155d1496f2325906e07 100644 (file)
@@ -119,6 +119,11 @@ def check_dh_dsa_support(dev):
     if tls.startswith("internal"):
         raise HwsimSkip("DH DSA not supported with this TLS library: " + tls)
 
+def check_ec_support(dev):
+    tls = dev.request("GET tls_library")
+    if tls.startswith("internal"):
+        raise HwsimSkip("EC not supported with this TLS library: " + tls)
+
 def read_pem(fname):
     with open(fname, "r") as f:
         lines = f.readlines()
@@ -5899,6 +5904,7 @@ def test_ap_wpa2_eap_tls_13_ec(dev, apdev):
 
 def test_ap_wpa2_eap_tls_rsa_and_ec(dev, apdev, params):
     """EAP-TLS and both RSA and EC sertificates certificates"""
+    check_ec_support(dev[0])
     ca = os.path.join(params['logdir'], "ap_wpa2_eap_tls_rsa_and_ec.ca.pem")
     with open(ca, "w") as f:
         with open("auth_serv/ca.pem", "r") as f2:
@@ -5942,6 +5948,7 @@ def test_ap_wpa2_eap_tls_rsa_and_ec(dev, apdev, params):
 
 def test_ap_wpa2_eap_tls_ec_and_rsa(dev, apdev, params):
     """EAP-TLS and both EC and RSA sertificates certificates"""
+    check_ec_support(dev[0])
     ca = os.path.join(params['logdir'], "ap_wpa2_eap_tls_ec_and_rsa.ca.pem")
     with open(ca, "w") as f:
         with open("auth_serv/ca.pem", "r") as f2: