From: Jouni Malinen Date: Sat, 28 Dec 2013 17:34:29 +0000 (+0200) Subject: tests: Verify that another station cannot use same PIN X-Git-Tag: hostap_2_1~310 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a60a6d6b802982f7c61d72b346b39a1f2df83be8;p=thirdparty%2Fhostap.git tests: Verify that another station cannot use same PIN Signed-hostap: Jouni Malinen --- diff --git a/tests/hwsim/test_ap_wps.py b/tests/hwsim/test_ap_wps.py index fe34eca03..8c3dac0ee 100644 --- a/tests/hwsim/test_ap_wps.py +++ b/tests/hwsim/test_ap_wps.py @@ -175,6 +175,13 @@ def test_ap_wps_conf_pin(dev, apdev): bss = dev[1].get_bss(apdev[0]['bssid']) if "[WPS-AUTH]" in bss['flags']: raise Exception("WPS-AUTH flag not cleared") + logger.info("Try to connect from another station using the same PIN") + dev[1].request("WPS_PIN any " + pin) + ev = dev[1].wait_event(["WPS-M2D","CTRL-EVENT-CONNECTED"], timeout=30) + if ev is None: + raise Exception("Operation timed out") + if "WPS-M2D" not in ev: + raise Exception("Unexpected WPS operation started") def test_ap_wps_reg_connect(dev, apdev): """WPS registrar using AP PIN to connect"""