tests: Include additional tests for wolfSSL builds

Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
This commit is contained in:
Juliusz Sosinowicz 2021-08-26 11:25:34 +02:00 committed by Jouni Malinen
parent 1cda3e76fc
commit af052e6e11
4 changed files with 13 additions and 12 deletions

View file

@ -50,7 +50,7 @@ def check_subject_match_support(dev):
def check_check_cert_subject_support(dev): def check_check_cert_subject_support(dev):
tls = dev.request("GET tls_library") tls = dev.request("GET tls_library")
if not tls.startswith("OpenSSL"): if not tls.startswith("OpenSSL") and not tls.startswith("wolfSSL"):
raise HwsimSkip("check_cert_subject not supported with this TLS library: " + tls) raise HwsimSkip("check_cert_subject not supported with this TLS library: " + tls)
def check_altsubject_match_support(dev): def check_altsubject_match_support(dev):
@ -3886,7 +3886,7 @@ def test_ap_wpa2_eap_fast_prf_oom(dev, apdev):
"""WPA2-Enterprise connection using EAP-FAST and OOM in PRF""" """WPA2-Enterprise connection using EAP-FAST and OOM in PRF"""
check_eap_capa(dev[0], "FAST") check_eap_capa(dev[0], "FAST")
tls = dev[0].request("GET tls_library") tls = dev[0].request("GET tls_library")
if tls.startswith("OpenSSL"): if tls.startswith("OpenSSL") or tls.startswith("wolfSSL"):
func = "tls_connection_get_eap_fast_key" func = "tls_connection_get_eap_fast_key"
count = 2 count = 2
elif tls.startswith("internal"): elif tls.startswith("internal"):
@ -6134,11 +6134,11 @@ def test_rsn_ie_proto_eap_sta(dev, apdev):
def check_tls_session_resumption_capa(dev, hapd): def check_tls_session_resumption_capa(dev, hapd):
tls = hapd.request("GET tls_library") tls = hapd.request("GET tls_library")
if not tls.startswith("OpenSSL"): if not tls.startswith("OpenSSL") and not tls.startswith("wolfSSL"):
raise HwsimSkip("hostapd TLS library is not OpenSSL or wolfSSL: " + tls) raise HwsimSkip("hostapd TLS library is not OpenSSL or wolfSSL: " + tls)
tls = dev.request("GET tls_library") tls = dev.request("GET tls_library")
if not tls.startswith("OpenSSL"): if not tls.startswith("OpenSSL") and not tls.startswith("wolfSSL"):
raise HwsimSkip("Session resumption not supported with this TLS library: " + tls) raise HwsimSkip("Session resumption not supported with this TLS library: " + tls)
def test_eap_ttls_pap_session_resumption(dev, apdev): def test_eap_ttls_pap_session_resumption(dev, apdev):

View file

@ -39,7 +39,7 @@ def check_dpp_capab(dev, brainpool=False, min_ver=1):
raise HwsimSkip("DPP not supported") raise HwsimSkip("DPP not supported")
if brainpool: if brainpool:
tls = dev.request("GET tls_library") tls = dev.request("GET tls_library")
if not tls.startswith("OpenSSL") or "run=BoringSSL" in tls: if (not tls.startswith("OpenSSL") or "run=BoringSSL" in tls) and not tls.startswith("wolfSSL"):
raise HwsimSkip("Crypto library does not support Brainpool curves: " + tls) raise HwsimSkip("Crypto library does not support Brainpool curves: " + tls)
capa = dev.request("GET_CAPABILITY dpp") capa = dev.request("GET_CAPABILITY dpp")
ver = 1 ver = 1

View file

@ -440,7 +440,7 @@ def test_eap_teap_tls_cs_sha384(dev, apdev):
def run_eap_teap_tls_cs(dev, apdev, cipher): def run_eap_teap_tls_cs(dev, apdev, cipher):
check_eap_capa(dev[0], "TEAP") check_eap_capa(dev[0], "TEAP")
tls = dev[0].request("GET tls_library") tls = dev[0].request("GET tls_library")
if not tls.startswith("OpenSSL"): if not tls.startswith("OpenSSL") and not tls.startswith("wolfSSL"):
raise HwsimSkip("TLS library not supported for TLS CS configuration: " + tls) raise HwsimSkip("TLS library not supported for TLS CS configuration: " + tls)
params = int_teap_server_params(eap_teap_auth="1") params = int_teap_server_params(eap_teap_auth="1")
params['openssl_ciphers'] = cipher params['openssl_ciphers'] = cipher

View file

@ -1422,12 +1422,13 @@ def run_fils_sk_pfs(dev, apdev, group, params):
check_erp_capa(dev[0]) check_erp_capa(dev[0])
tls = dev[0].request("GET tls_library") tls = dev[0].request("GET tls_library")
if int(group) in [25]: if not tls.startswith("wolfSSL"):
if not (tls.startswith("OpenSSL") and ("build=OpenSSL 1.0.2" in tls or "build=OpenSSL 1.1" in tls or "build=OpenSSL 3.0" in tls) and ("run=OpenSSL 1.0.2" in tls or "run=OpenSSL 1.1" in tls or "run=OpenSSL 3.0" in tls)): if int(group) in [25]:
raise HwsimSkip("EC group not supported") if not (tls.startswith("OpenSSL") and ("build=OpenSSL 1.0.2" in tls or "build=OpenSSL 1.1" in tls or "build=OpenSSL 3.0" in tls) and ("run=OpenSSL 1.0.2" in tls or "run=OpenSSL 1.1" in tls or "run=OpenSSL 3.0" in tls)):
if int(group) in [27, 28, 29, 30]: raise HwsimSkip("EC group not supported")
if not (tls.startswith("OpenSSL") and ("build=OpenSSL 1.0.2" in tls or "build=OpenSSL 1.1" in tls or "build=OpenSSL 3.0" in tls) and ("run=OpenSSL 1.0.2" in tls or "run=OpenSSL 1.1" in tls or "run=OpenSSL 3.0" in tls)): if int(group) in [27, 28, 29, 30]:
raise HwsimSkip("Brainpool EC group not supported") if not (tls.startswith("OpenSSL") and ("build=OpenSSL 1.0.2" in tls or "build=OpenSSL 1.1" in tls or "build=OpenSSL 3.0" in tls) and ("run=OpenSSL 1.0.2" in tls or "run=OpenSSL 1.1" in tls or "run=OpenSSL 3.0" in tls)):
raise HwsimSkip("Brainpool EC group not supported")
start_erp_as(msk_dump=os.path.join(params['logdir'], "msk.lst")) start_erp_as(msk_dump=os.path.join(params['logdir'], "msk.lst"))