tests: EAP with expanded Nak
Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
633e364b60
commit
32dca985c7
1 changed files with 24 additions and 0 deletions
|
@ -1198,3 +1198,27 @@ def test_ap_wpa2_eap_too_many_roundtrips(dev, apdev):
|
||||||
ev = dev[0].wait_event(["EAP: more than"], timeout=20)
|
ev = dev[0].wait_event(["EAP: more than"], timeout=20)
|
||||||
if ev is None:
|
if ev is None:
|
||||||
raise Exception("EAP roundtrip limit not reached")
|
raise Exception("EAP roundtrip limit not reached")
|
||||||
|
|
||||||
|
def test_ap_wpa2_eap_expanded_nak(dev, apdev):
|
||||||
|
"""WPA2-Enterprise connection with EAP resulting in expanded NAK"""
|
||||||
|
params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
|
||||||
|
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||||
|
dev[0].connect("test-wpa2-eap", key_mgmt="WPA-EAP WPA-EAP-SHA256",
|
||||||
|
eap="PSK", identity="vendor-test",
|
||||||
|
password_hex="ff23456789abcdef0123456789abcdef",
|
||||||
|
wait_connect=False)
|
||||||
|
|
||||||
|
found = False
|
||||||
|
for i in range(0, 5):
|
||||||
|
ev = dev[0].wait_event(["CTRL-EVENT-EAP-STATUS"], timeout=10)
|
||||||
|
if ev is None:
|
||||||
|
raise Exception("Association and EAP start timed out")
|
||||||
|
if "refuse proposed method" in ev:
|
||||||
|
found = True
|
||||||
|
break
|
||||||
|
if not found:
|
||||||
|
raise Exception("Unexpected EAP status: " + ev)
|
||||||
|
|
||||||
|
ev = dev[0].wait_event(["CTRL-EVENT-EAP-FAILURE"])
|
||||||
|
if ev is None:
|
||||||
|
raise Exception("EAP failure timed out")
|
||||||
|
|
Loading…
Reference in a new issue