tests: Additional coverage for hostapd GET_CONFIG key_mgmt values

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2021-02-28 20:47:37 +02:00
parent 8c6723b7f3
commit 250cb99f4d
4 changed files with 17 additions and 0 deletions

View file

@ -3201,6 +3201,10 @@ def test_ap_ft_eap_sha384(dev, apdev):
params["ieee8021x"] = "1"
params = dict(list(radius.items()) + list(params.items()))
hapd0 = hostapd.add_ap(apdev[0], params)
conf = hapd0.request("GET_CONFIG")
if "key_mgmt=FT-EAP-SHA384" not in conf.splitlines():
logger.info("GET_CONFIG:\n" + conf)
raise Exception("GET_CONFIG did not report correct key_mgmt")
params = ft_params2(ssid=ssid, passphrase=passphrase)
params["ieee80211w"] = "2"
params['wpa_key_mgmt'] = "FT-EAP-SHA384"

View file

@ -1482,6 +1482,11 @@ def run_dpp_akm(dev, apdev, pmk_len):
except:
raise HwsimSkip("DPP not supported")
conf = hapd.request("GET_CONFIG")
if "key_mgmt=DPP" not in conf.splitlines():
logger.info("GET_CONFIG:\n" + conf)
raise Exception("GET_CONFIG did not report correct key_mgmt")
id = dev[0].connect("dpp", key_mgmt="DPP", ieee80211w="2", scan_freq="2412",
dpp_pfs="2", wait_connect=False)
ev = dev[0].wait_event(["CTRL-EVENT-NETWORK-NOT-FOUND"], timeout=2)

View file

@ -1838,6 +1838,10 @@ def test_fils_and_ft_over_air_sha384(dev, apdev, params):
def run_fils_and_ft_over_air(dev, apdev, params, key_mgmt):
hapd, hapd2 = run_fils_and_ft_setup(dev, apdev, params, key_mgmt)
conf = hapd.request("GET_CONFIG")
if "key_mgmt=" + key_mgmt not in conf.splitlines():
logger.info("GET_CONFIG:\n" + conf)
raise Exception("GET_CONFIG did not report correct key_mgmt")
logger.info("FT protocol using FT key hierarchy established during FILS authentication")
dev[0].scan_for_bss(apdev[1]['bssid'], freq="2412", force_scan=True)

View file

@ -29,6 +29,10 @@ def test_owe(dev, apdev):
"rsn_pairwise": "CCMP"}
hapd = hostapd.add_ap(apdev[0], params)
bssid = hapd.own_addr()
conf = hapd.request("GET_CONFIG")
if "key_mgmt=OWE" not in conf.splitlines():
logger.info("GET_CONFIG:\n" + conf)
raise Exception("GET_CONFIG did not report correct key_mgmt")
dev[0].scan_for_bss(bssid, freq="2412")
bss = dev[0].get_bss(bssid)