Testing functionality to allow EAPOL-Key Reserved field to be set

The new hostapd configuration parameter eapol_key_reserved_random=1 can
be used for testing STA/Supplicant functionality to accept a random
value in the Reserved field within EAPOL-Key frames.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
Jouni Malinen 2024-07-24 17:22:42 +00:00 committed by Jouni Malinen
parent 2e4c612dd2
commit 296104d35c
6 changed files with 22 additions and 0 deletions

View file

@ -3273,3 +3273,15 @@ def test_sae_ssid_protection(dev, apdev):
if dev[0].get_status_field("ssid_verified") != "1":
raise Exception("ssid_verified=1 not in STATUS")
def test_sae_eapol_key_reserved_random(dev, apdev):
"""SAE with EAPOL-Key Reserved field set to random value"""
check_sae_capab(dev[0])
params = hostapd.wpa2_params(ssid="test-sae", passphrase="12345678")
params['wpa_key_mgmt'] = 'SAE'
params['eapol_key_reserved_random'] = '1'
hapd = hostapd.add_ap(apdev[0], params)
dev[0].set("sae_groups", "")
dev[0].connect("test-sae", psk="12345678", key_mgmt="SAE",
scan_freq="2412")