tests: WPS 2.0 rejection of WEP credential
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
08e4bd8751
commit
11d78bb1ee
2 changed files with 15 additions and 0 deletions
|
@ -958,6 +958,21 @@ def test_ap_wps_wep_config(dev, apdev):
|
||||||
if "Peer Address: " + dev[0].p2p_interface_addr() not in status:
|
if "Peer Address: " + dev[0].p2p_interface_addr() not in status:
|
||||||
raise Exception("Peer address not shown correctly")
|
raise Exception("Peer address not shown correctly")
|
||||||
|
|
||||||
|
def test_ap_wps_wep_enroll(dev, apdev):
|
||||||
|
"""WPS 2.0 STA rejecting WEP configuration"""
|
||||||
|
ssid = "test-wps-wep"
|
||||||
|
hostapd.add_ap(apdev[0]['ifname'],
|
||||||
|
{ "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||||
|
"skip_cred_build": "1", "extra_cred": "wps-wep-cred" })
|
||||||
|
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
||||||
|
hapd.request("WPS_PBC")
|
||||||
|
dev[0].request("WPS_PBC")
|
||||||
|
ev = dev[0].wait_event(["WPS-FAIL"], timeout=15)
|
||||||
|
if ev is None:
|
||||||
|
raise Exception("WPS-FAIL event timed out")
|
||||||
|
if "msg=12" not in ev or "reason=2 (WEP Prohibited)" not in ev:
|
||||||
|
raise Exception("Unexpected WPS-FAIL event: " + ev)
|
||||||
|
|
||||||
def test_ap_wps_ie_fragmentation(dev, apdev):
|
def test_ap_wps_ie_fragmentation(dev, apdev):
|
||||||
"""WPS AP using fragmented WPS IE"""
|
"""WPS AP using fragmented WPS IE"""
|
||||||
ssid = "test-wps-ie-fragmentation"
|
ssid = "test-wps-ie-fragmentation"
|
||||||
|
|
BIN
tests/hwsim/wps-wep-cred
Normal file
BIN
tests/hwsim/wps-wep-cred
Normal file
Binary file not shown.
Loading…
Reference in a new issue