]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: SAE and PSK enabled in network profile; SAE first, then SAE disabled
authorJouni Malinen <jouni.malinen@oss.qualcomm.com>
Mon, 1 Dec 2025 17:19:49 +0000 (19:19 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 1 Dec 2025 17:34:56 +0000 (19:34 +0200)
Signed-off-by: Jouni Malinen <jouni.malinen@oss.qualcomm.com>
tests/hwsim/test_sae.py

index ba27d49f687522f55ef26af93e024a00a2874d73..74df75506f343e95c2db0ad4e6d972c96d020486 100644 (file)
@@ -471,6 +471,27 @@ def test_sae_and_psk2(dev, apdev):
     dev[0].connect("test-psk", psk="12345678", key_mgmt="SAE WPA-PSK",
                    scan_freq="2412")
 
+def test_sae_and_psk_disable_sae(dev, apdev):
+    """SAE and PSK enabled in network profile; SAE first, then SAE disabled"""
+    check_sae_capab(dev[0])
+    params = hostapd.wpa2_params(ssid="test-sae", passphrase="12345678")
+    params['wpa_key_mgmt'] = 'SAE WPA-PSK'
+    params['ieee80211w'] = '1'
+    params['sae_require_mfp'] = '1'
+    hapd = hostapd.add_ap(apdev[0], params)
+
+    dev[0].set("sae_groups", "")
+    dev[0].connect("test-sae", psk="12345678", key_mgmt="SAE WPA-PSK",
+                   ieee80211w="1", scan_freq="2412")
+    hapd.disable()
+    dev[0].wait_disconnected()
+    dev[0].dump_monitor()
+
+    logger.info("Disable SAE on AP and try to reconnect to the same AP")
+    hapd.set('wpa_key_mgmt', 'WPA-PSK')
+    hapd.enable()
+    dev[0].wait_connected()
+
 def test_sae_wpa3_roam(dev, apdev):
     """SAE and WPA3-Personal transition mode roaming"""
     check_sae_capab(dev[0])