tests: SAE with SSID protection in 4-way handshake

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
Jouni Malinen 2024-06-19 01:11:40 +03:00 committed by Jouni Malinen
parent 37a289f8bc
commit b54ccd4129
2 changed files with 20 additions and 0 deletions

View file

@ -3086,3 +3086,22 @@ def test_sae_password_file(dev, apdev):
key_mgmt="SAE", scan_freq="2412") key_mgmt="SAE", scan_freq="2412")
finally: finally:
os.unlink(fn) 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()

View file

@ -1116,6 +1116,7 @@ class WpaSupplicant:
"mac_value", "mac_value",
"wpa_deny_ptk0_rekey", "wpa_deny_ptk0_rekey",
"max_idle", "max_idle",
"ssid_protection",
"enable_4addr_mode"] "enable_4addr_mode"]
for field in not_quoted: for field in not_quoted:
if field in kwargs and kwargs[field]: if field in kwargs and kwargs[field]: