tests: Move ERP/FILS capability checks to utils.py
Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
8884e33eef
commit
ecc46f2900
5 changed files with 19 additions and 21 deletions
|
@ -16,9 +16,8 @@ import threading
|
|||
import time
|
||||
|
||||
import hostapd
|
||||
from utils import HwsimSkip, alloc_fail, fail_test, wait_fail_trigger
|
||||
from utils import *
|
||||
from test_ap_eap import check_eap_capa, check_hlr_auc_gw_support, int_eap_server_params
|
||||
from test_erp import check_erp_capa
|
||||
|
||||
try:
|
||||
import OpenSSL
|
||||
|
|
|
@ -11,15 +11,10 @@ import os
|
|||
import time
|
||||
|
||||
import hostapd
|
||||
from utils import HwsimSkip, alloc_fail, fail_test, wait_fail_trigger
|
||||
from utils import *
|
||||
from test_ap_eap import int_eap_server_params
|
||||
from test_ap_psk import find_wpas_process, read_process_memory, verify_not_present, get_key_locations
|
||||
|
||||
def check_erp_capa(dev):
|
||||
capab = dev.get_capability("erp")
|
||||
if not capab or 'ERP' not in capab:
|
||||
raise HwsimSkip("ERP not supported in the build")
|
||||
|
||||
def test_erp_initiate_reauth_start(dev, apdev):
|
||||
"""Authenticator sending EAP-Initiate/Re-auth-Start, but ERP disabled on peer"""
|
||||
params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
|
||||
|
|
|
@ -18,19 +18,9 @@ from tshark import run_tshark
|
|||
from wpasupplicant import WpaSupplicant
|
||||
import hwsim_utils
|
||||
from utils import *
|
||||
from test_erp import check_erp_capa, start_erp_as
|
||||
from test_erp import start_erp_as
|
||||
from test_ap_hs20 import ip_checksum
|
||||
|
||||
def check_fils_capa(dev):
|
||||
capa = dev.get_capability("fils")
|
||||
if capa is None or "FILS" not in capa:
|
||||
raise HwsimSkip("FILS not supported")
|
||||
|
||||
def check_fils_sk_pfs_capa(dev):
|
||||
capa = dev.get_capability("fils")
|
||||
if capa is None or "FILS-SK-PFS" not in capa:
|
||||
raise HwsimSkip("FILS-SK-PFS not supported")
|
||||
|
||||
def test_fils_sk_full_auth(dev, apdev, params):
|
||||
"""FILS SK full authentication"""
|
||||
check_fils_capa(dev[0])
|
||||
|
|
|
@ -19,8 +19,7 @@ import hostapd
|
|||
from wpasupplicant import WpaSupplicant
|
||||
from utils import *
|
||||
from hwsim import HWSimRadio
|
||||
from test_erp import check_erp_capa, start_erp_as
|
||||
from test_fils import check_fils_capa
|
||||
from test_erp import start_erp_as
|
||||
from test_ap_ft import run_roams, ft_params1, ft_params2
|
||||
|
||||
def check_pasn_capab(dev):
|
||||
|
|
|
@ -117,6 +117,21 @@ def check_sae_pk_capab(dev):
|
|||
if "PK" not in dev.get_capability("sae"):
|
||||
raise HwsimSkip("SAE-PK not supported")
|
||||
|
||||
def check_erp_capa(dev):
|
||||
capab = dev.get_capability("erp")
|
||||
if not capab or 'ERP' not in capab:
|
||||
raise HwsimSkip("ERP not supported in the build")
|
||||
|
||||
def check_fils_capa(dev):
|
||||
capa = dev.get_capability("fils")
|
||||
if capa is None or "FILS" not in capa:
|
||||
raise HwsimSkip("FILS not supported")
|
||||
|
||||
def check_fils_sk_pfs_capa(dev):
|
||||
capa = dev.get_capability("fils")
|
||||
if capa is None or "FILS-SK-PFS" not in capa:
|
||||
raise HwsimSkip("FILS-SK-PFS not supported")
|
||||
|
||||
def check_tls_tod(dev):
|
||||
tls = dev.request("GET tls_library")
|
||||
if not tls.startswith("OpenSSL") and not tls.startswith("internal"):
|
||||
|
|
Loading…
Reference in a new issue