summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-09-01 12:25:31 +0300
committerJouni Malinen <j@w1.fi>2015-09-01 12:31:16 +0300
commitfbf6b717914dabe7ad462d084d5f4ba802eb5f96 (patch)
treebe01fa771edfee246b31a0a892d7eaf1cb4c0347 /tests
parentea982de1eec41ba1faa441e8f9394751fc24f9fd (diff)
downloadhostap-fbf6b717914dabe7ad462d084d5f4ba802eb5f96.tar.gz
tests: AP configuration using wps_config and wps_cred_processing=2
Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/test_ap_wps.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/hwsim/test_ap_wps.py b/tests/hwsim/test_ap_wps.py
index 466ba3952..de64fab69 100644
--- a/tests/hwsim/test_ap_wps.py
+++ b/tests/hwsim/test_ap_wps.py
@@ -175,6 +175,21 @@ def test_ap_wps_init_through_wps_config(dev, apdev):
dev[0].connect(ssid, psk="12345678", scan_freq="2412", proto="WPA2",
pairwise="CCMP", group="CCMP")
+def test_ap_wps_init_through_wps_config_2(dev, apdev):
+ """AP configuration using wps_config and wps_cred_processing=2"""
+ ssid = "test-wps-init-config"
+ hostapd.add_ap(apdev[0]['ifname'],
+ { "ssid": ssid, "eap_server": "1", "wps_state": "1",
+ "wps_cred_processing": "2" })
+ hapd = hostapd.Hostapd(apdev[0]['ifname'])
+ if "FAIL" in hapd.request("WPS_CONFIG " + ssid.encode("hex") + " WPA2PSK CCMP " + "12345678".encode("hex")):
+ raise Exception("WPS_CONFIG command failed")
+ ev = hapd.wait_event(["WPS-NEW-AP-SETTINGS"], timeout=5)
+ if ev is None:
+ raise Exception("Timeout on WPS-NEW-AP-SETTINGS events")
+ if "100e" not in ev:
+ raise Exception("WPS-NEW-AP-SETTINGS did not include Credential")
+
def test_ap_wps_invalid_wps_config_passphrase(dev, apdev):
"""AP configuration using wps_config command with invalid passphrase"""
ssid = "test-wps-init-config"