]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Skip TOD-TOFU/STRICT tests if build does not support this
authorJouni Malinen <j@w1.fi>
Sat, 16 May 2020 18:58:10 +0000 (21:58 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 16 May 2020 18:58:10 +0000 (21:58 +0300)
This functionality is currently available only with OpenSSL and internal
TLS implementation.

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

index f41c6ffb3c94f3ce1e0d4b9ac42ccef146b6591d..0eed03500143b58686148c8eb343ee329e0b1d47 100644 (file)
@@ -7250,6 +7250,7 @@ def run_openssl_systemwide_policy(iface, apdev, test_params):
 
 def test_ap_wpa2_eap_tls_tod(dev, apdev):
     """EAP-TLS server certificate validation and TOD-STRICT"""
+    check_tls_tod(dev[0])
     params = int_eap_server_params()
     params["server_cert"] = "auth_serv/server-certpol.pem"
     params["private_key"] = "auth_serv/server-certpol.key"
@@ -7279,6 +7280,7 @@ def test_ap_wpa2_eap_tls_tod(dev, apdev):
 
 def test_ap_wpa2_eap_tls_tod_tofu(dev, apdev):
     """EAP-TLS server certificate validation and TOD-TOFU"""
+    check_tls_tod(dev[0])
     params = int_eap_server_params()
     params["server_cert"] = "auth_serv/server-certpol2.pem"
     params["private_key"] = "auth_serv/server-certpol2.key"
index dc2986b51be5b4bf59969f912d322b6acad58a0d..f1e8dfc39ee0c00f1feb0b19e3c6f8e433310ad5 100644 (file)
@@ -19,7 +19,7 @@ import threading
 import time
 
 import hostapd
-from utils import HwsimSkip
+from utils import *
 from hwsim import HWSimRadio
 import hwsim_utils
 from wlantest import Wlantest
@@ -3817,6 +3817,7 @@ def test_sigma_dut_eap_ttls_uosc_tod_tofu(dev, apdev, params):
     run_sigma_dut_eap_ttls_uosc_tod(dev, apdev, params, True)
 
 def run_sigma_dut_eap_ttls_uosc_tod(dev, apdev, params, tofu):
+    check_tls_tod(dev[0])
     logdir = params['logdir']
 
     name = "sigma_dut_eap_ttls_uosc_tod"
@@ -3895,6 +3896,7 @@ def test_sigma_dut_eap_ttls_uosc_initial_tod_tofu(dev, apdev, params):
     run_sigma_dut_eap_ttls_uosc_initial_tod(dev, apdev, params, True)
 
 def run_sigma_dut_eap_ttls_uosc_initial_tod(dev, apdev, params, tofu):
+    check_tls_tod(dev[0])
     logdir = params['logdir']
 
     name = "sigma_dut_eap_ttls_uosc_initial_tod"
index c259a766c0f0b713b8167d5d32136b7f9fda0af4..a6f260b62247b6827a878612c157b5e18b0f7743 100644 (file)
@@ -113,6 +113,11 @@ def check_sae_capab(dev):
     if "SAE" not in dev.get_capability("auth_alg"):
         raise HwsimSkip("SAE not supported")
 
+def check_tls_tod(dev):
+    tls = dev.request("GET tls_library")
+    if not tls.startswith("OpenSSL") and not tls.startswith("internal"):
+        raise HwsimSkip("TLS TOD-TOFU/STRICT not supported with this TLS library: " + tls)
+
 def vht_supported():
     cmd = subprocess.Popen(["iw", "reg", "get"], stdout=subprocess.PIPE)
     reg = cmd.stdout.read()