ev = hapd.wait_event(["AP-STA-CONNECTED"], timeout=5)
if ev is None:
raise Exception("No connection event received from hostapd")
+ sta0 = hapd.get_sta(dev[0].own_addr())
+ if sta0['wpa'] != '2' or sta0['AKMSuiteSelector'] != '00-0f-ac-8':
+ raise Exception("SAE STA(0) AKM suite selector reported incorrectly")
dev[0].request("DISCONNECT")
dev[0].wait_disconnected()
dev[0].request("RECONNECT")
dev[0].wait_connected(timeout=15, error="Reconnect timed out")
if dev[0].get_status_field('sae_group') is not None:
raise Exception("SAE group claimed to have been used")
+ sta0 = hapd.get_sta(dev[0].own_addr())
+ if sta0['wpa'] != '2' or sta0['AKMSuiteSelector'] != '00-0f-ac-8':
+ raise Exception("SAE STA(0) AKM suite selector reported incorrectly after PMKSA caching")
@remote_compatible
def test_sae_pmksa_caching_disabled(dev, apdev):
params = hostapd.wpa2_params(ssid="test-sae", passphrase="12345678")
params['wpa_key_mgmt'] = 'SAE WPA-PSK'
params['sae_anti_clogging_threshold'] = '0'
- hostapd.add_ap(apdev[0], params)
+ hapd = hostapd.add_ap(apdev[0], params)
dev[2].connect("test-sae", psk="12345678", scan_freq="2412")
for i in range(0, 2):
dev[i].request("SET sae_groups ")
dev[i].connect("test-sae", psk="12345678", key_mgmt="SAE",
scan_freq="2412")
+ sta0 = hapd.get_sta(dev[0].own_addr())
+ sta2 = hapd.get_sta(dev[2].own_addr())
+ if sta0['wpa'] != '2' or sta0['AKMSuiteSelector'] != '00-0f-ac-8':
+ raise Exception("SAE STA(0) AKM suite selector reported incorrectly")
+ if sta2['wpa'] != '2' or sta2['AKMSuiteSelector'] != '00-0f-ac-2':
+ raise Exception("PSK STA(2) AKM suite selector reported incorrectly")
def test_sae_and_psk(dev, apdev):
"""SAE and PSK enabled in network profile"""