]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Additional coverage for hostapd GET_CONFIG key_mgmt values
authorJouni Malinen <j@w1.fi>
Sun, 28 Feb 2021 18:47:37 +0000 (20:47 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 28 Feb 2021 20:31:58 +0000 (22:31 +0200)
Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_ap_ft.py
tests/hwsim/test_dpp.py
tests/hwsim/test_fils.py
tests/hwsim/test_owe.py

index 1598c89a67a498d4ece8a4bc4834c239653fa8bd..c28dd26e1e68b434fb27750fd4a897bcb17ff727 100644 (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"
index 233c6a5a596aaba2c51cca15163e5a7a48c174c5..3d34f5ed623eb649768b130bd685e7e6c3944b50 100644 (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)
index 4616ca360a2c0921a09f99ac4987b99a5123c40b..d867e8fd4137407c7408cfa07eb04012a778faa2 100644 (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)
index 95c6b19b89cee911e02ff6d1097a3613b17f4cd9..b61bc59f25f8c8aa316bf57afc088f8002ecc070 100644 (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)