tests: Skip TOD-TOFU/STRICT tests if build does not support this
This functionality is currently available only with OpenSSL and internal TLS implementation. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
4294d221d3
commit
f636bc3abc
3 changed files with 10 additions and 1 deletions
|
@ -7250,6 +7250,7 @@ def run_openssl_systemwide_policy(iface, apdev, test_params):
|
||||||
|
|
||||||
def test_ap_wpa2_eap_tls_tod(dev, apdev):
|
def test_ap_wpa2_eap_tls_tod(dev, apdev):
|
||||||
"""EAP-TLS server certificate validation and TOD-STRICT"""
|
"""EAP-TLS server certificate validation and TOD-STRICT"""
|
||||||
|
check_tls_tod(dev[0])
|
||||||
params = int_eap_server_params()
|
params = int_eap_server_params()
|
||||||
params["server_cert"] = "auth_serv/server-certpol.pem"
|
params["server_cert"] = "auth_serv/server-certpol.pem"
|
||||||
params["private_key"] = "auth_serv/server-certpol.key"
|
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):
|
def test_ap_wpa2_eap_tls_tod_tofu(dev, apdev):
|
||||||
"""EAP-TLS server certificate validation and TOD-TOFU"""
|
"""EAP-TLS server certificate validation and TOD-TOFU"""
|
||||||
|
check_tls_tod(dev[0])
|
||||||
params = int_eap_server_params()
|
params = int_eap_server_params()
|
||||||
params["server_cert"] = "auth_serv/server-certpol2.pem"
|
params["server_cert"] = "auth_serv/server-certpol2.pem"
|
||||||
params["private_key"] = "auth_serv/server-certpol2.key"
|
params["private_key"] = "auth_serv/server-certpol2.key"
|
||||||
|
|
|
@ -19,7 +19,7 @@ import threading
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import hostapd
|
import hostapd
|
||||||
from utils import HwsimSkip
|
from utils import *
|
||||||
from hwsim import HWSimRadio
|
from hwsim import HWSimRadio
|
||||||
import hwsim_utils
|
import hwsim_utils
|
||||||
from wlantest import Wlantest
|
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)
|
run_sigma_dut_eap_ttls_uosc_tod(dev, apdev, params, True)
|
||||||
|
|
||||||
def run_sigma_dut_eap_ttls_uosc_tod(dev, apdev, params, tofu):
|
def run_sigma_dut_eap_ttls_uosc_tod(dev, apdev, params, tofu):
|
||||||
|
check_tls_tod(dev[0])
|
||||||
logdir = params['logdir']
|
logdir = params['logdir']
|
||||||
|
|
||||||
name = "sigma_dut_eap_ttls_uosc_tod"
|
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)
|
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):
|
def run_sigma_dut_eap_ttls_uosc_initial_tod(dev, apdev, params, tofu):
|
||||||
|
check_tls_tod(dev[0])
|
||||||
logdir = params['logdir']
|
logdir = params['logdir']
|
||||||
|
|
||||||
name = "sigma_dut_eap_ttls_uosc_initial_tod"
|
name = "sigma_dut_eap_ttls_uosc_initial_tod"
|
||||||
|
|
|
@ -113,6 +113,11 @@ def check_sae_capab(dev):
|
||||||
if "SAE" not in dev.get_capability("auth_alg"):
|
if "SAE" not in dev.get_capability("auth_alg"):
|
||||||
raise HwsimSkip("SAE not supported")
|
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():
|
def vht_supported():
|
||||||
cmd = subprocess.Popen(["iw", "reg", "get"], stdout=subprocess.PIPE)
|
cmd = subprocess.Popen(["iw", "reg", "get"], stdout=subprocess.PIPE)
|
||||||
reg = cmd.stdout.read()
|
reg = cmd.stdout.read()
|
||||||
|
|
Loading…
Reference in a new issue