aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2017-11-30 21:06:33 (GMT)
committerJouni Malinen <j@w1.fi>2017-11-30 21:06:33 (GMT)
commitce83008c79917d3f8bbb388e64f582e2cdf30e3b (patch)
treeff67d8a251e7147dd15c4615c83374905c76fe2e
parent6923312dc6f9a12cd9c7d6f0c49db569fe644115 (diff)
downloadhostap-ce83008c79917d3f8bbb388e64f582e2cdf30e3b.zip
hostap-ce83008c79917d3f8bbb388e64f582e2cdf30e3b.tar.gz
hostap-ce83008c79917d3f8bbb388e64f582e2cdf30e3b.tar.bz2
tests: sigma_dut and WPS PBC Enrollee
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
-rw-r--r--tests/hwsim/test_sigma_dut.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/hwsim/test_sigma_dut.py b/tests/hwsim/test_sigma_dut.py
index 80d952d..2178ff4 100644
--- a/tests/hwsim/test_sigma_dut.py
+++ b/tests/hwsim/test_sigma_dut.py
@@ -1845,3 +1845,32 @@ def run_sigma_dut_preconfigured_profile(dev, apdev):
sigma_dut_cmd_check("sta_reset_default,interface," + ifname)
stop_sigma_dut(sigma)
+
+def test_sigma_dut_wps_pbc(dev, apdev):
+ """sigma_dut and WPS PBC Enrollee"""
+ try:
+ run_sigma_dut_wps_pbc(dev, apdev)
+ finally:
+ dev[0].set("ignore_old_scan_res", "0")
+
+def run_sigma_dut_wps_pbc(dev, apdev):
+ ssid = "test-wps-conf"
+ hapd = hostapd.add_ap(apdev[0],
+ { "ssid": "wps", "eap_server": "1", "wps_state": "2",
+ "wpa_passphrase": "12345678", "wpa": "2",
+ "wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP" })
+ hapd.request("WPS_PBC")
+
+ ifname = dev[0].ifname
+ sigma = start_sigma_dut(ifname)
+
+ cmd = "start_wps_registration,interface,%s" % ifname
+ cmd += ",WpsRole,Enrollee"
+ cmd += ",WpsConfigMethod,PBC"
+ sigma_dut_cmd_check(cmd, timeout=15)
+
+ sigma_dut_cmd_check("sta_disconnect,interface," + ifname)
+ hapd.disable()
+ sigma_dut_cmd_check("sta_reset_default,interface," + ifname)
+ stop_sigma_dut(sigma)
+ dev[0].flush_scan_cache()