]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: SAE with SSID protection in 4-way handshake
authorJouni Malinen <quic_jouni@quicinc.com>
Tue, 18 Jun 2024 22:11:40 +0000 (01:11 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 19 Jun 2024 09:38:14 +0000 (12:38 +0300)
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
tests/hwsim/test_sae.py
tests/hwsim/wpasupplicant.py

index aceb927516e636c3b90f654ef50c585c0e4dbb1a..d2c6243d26811ddacd175e32bca4296a3b192662 100644 (file)
@@ -3086,3 +3086,22 @@ def test_sae_password_file(dev, apdev):
                        key_mgmt="SAE", scan_freq="2412")
     finally:
         os.unlink(fn)
+
+def test_sae_ssid_protection(dev, apdev):
+    """SAE with SSID protection in 4-way handshake"""
+    check_sae_capab(dev[0])
+    params = hostapd.wpa2_params(ssid="test-sae",
+                                 passphrase="12345678")
+    params['wpa_key_mgmt'] = 'SAE'
+    params['ssid_protection'] = '1'
+    hapd = hostapd.add_ap(apdev[0], params)
+
+    dev[0].set("sae_groups", "")
+    dev[0].connect("test-sae", psk="12345678", key_mgmt="SAE",
+                   ssid_protection="1",
+                   scan_freq="2412", wait_connect=False)
+    ev = dev[0].wait_event(["RSN: SSID matched expected value"], timeout=10)
+    if ev is None:
+        raise Exception("SSID protection event not seen")
+    dev[0].wait_connected()
+    hapd.wait_sta()
index 1b3fd09488d649705eea32a64c1e226666044ba9..d5f2b409f666e476bbe69221c100a81626355c1a 100644 (file)
@@ -1116,6 +1116,7 @@ class WpaSupplicant:
                       "mac_value",
                       "wpa_deny_ptk0_rekey",
                       "max_idle",
+                      "ssid_protection",
                       "enable_4addr_mode"]
         for field in not_quoted:
             if field in kwargs and kwargs[field]: