From fbf6b717914dabe7ad462d084d5f4ba802eb5f96 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 1 Sep 2015 12:25:31 +0300 Subject: [PATCH] tests: AP configuration using wps_config and wps_cred_processing=2 Signed-off-by: Jouni Malinen --- tests/hwsim/test_ap_wps.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/hwsim/test_ap_wps.py b/tests/hwsim/test_ap_wps.py index 466ba39..de64fab 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" -- 2.1.4