mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-18 19:04:02 -05:00
tests: AKM suite selector reporting
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
d1b1f9fa9a
commit
61ec2353f8
@ -105,12 +105,18 @@ def test_sae_pmksa_caching(dev, apdev):
|
|||||||
ev = hapd.wait_event(["AP-STA-CONNECTED"], timeout=5)
|
ev = hapd.wait_event(["AP-STA-CONNECTED"], timeout=5)
|
||||||
if ev is None:
|
if ev is None:
|
||||||
raise Exception("No connection event received from hostapd")
|
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].request("DISCONNECT")
|
||||||
dev[0].wait_disconnected()
|
dev[0].wait_disconnected()
|
||||||
dev[0].request("RECONNECT")
|
dev[0].request("RECONNECT")
|
||||||
dev[0].wait_connected(timeout=15, error="Reconnect timed out")
|
dev[0].wait_connected(timeout=15, error="Reconnect timed out")
|
||||||
if dev[0].get_status_field('sae_group') is not None:
|
if dev[0].get_status_field('sae_group') is not None:
|
||||||
raise Exception("SAE group claimed to have been used")
|
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
|
@remote_compatible
|
||||||
def test_sae_pmksa_caching_disabled(dev, apdev):
|
def test_sae_pmksa_caching_disabled(dev, apdev):
|
||||||
@ -271,13 +277,19 @@ def test_sae_mixed(dev, apdev):
|
|||||||
params = hostapd.wpa2_params(ssid="test-sae", passphrase="12345678")
|
params = hostapd.wpa2_params(ssid="test-sae", passphrase="12345678")
|
||||||
params['wpa_key_mgmt'] = 'SAE WPA-PSK'
|
params['wpa_key_mgmt'] = 'SAE WPA-PSK'
|
||||||
params['sae_anti_clogging_threshold'] = '0'
|
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")
|
dev[2].connect("test-sae", psk="12345678", scan_freq="2412")
|
||||||
for i in range(0, 2):
|
for i in range(0, 2):
|
||||||
dev[i].request("SET sae_groups ")
|
dev[i].request("SET sae_groups ")
|
||||||
dev[i].connect("test-sae", psk="12345678", key_mgmt="SAE",
|
dev[i].connect("test-sae", psk="12345678", key_mgmt="SAE",
|
||||||
scan_freq="2412")
|
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):
|
def test_sae_and_psk(dev, apdev):
|
||||||
"""SAE and PSK enabled in network profile"""
|
"""SAE and PSK enabled in network profile"""
|
||||||
|
Loading…
Reference in New Issue
Block a user