]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: WPS cred event for external use
authorJouni Malinen <j@w1.fi>
Sun, 6 Apr 2014 08:09:03 +0000 (11:09 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 6 Apr 2014 09:31:45 +0000 (12:31 +0300)
Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_ap_wps.py

index 9f4cae1dadb1cc2a7e34abbb73bb61123c8f6a69..57467106b98fa0357f6db947ba2d859c1c4b6370 100644 (file)
@@ -93,7 +93,14 @@ def test_ap_wps_init_2ap_pbc(dev, apdev):
     if "[WPS-PBC]" not in bss['flags']:
         raise Exception("WPS-PBC flag missing from AP2")
     dev[0].dump_monitor()
+    dev[0].request("SET wps_cred_processing 2")
     dev[0].request("WPS_PBC")
+    ev = dev[0].wait_event(["WPS-CRED-RECEIVED"], timeout=30)
+    dev[0].request("SET wps_cred_processing 0")
+    if ev is None:
+        raise Exception("WPS cred event not seen")
+    if "100e" not in ev:
+        raise Exception("WPS attributes not included in the cred event")
     ev = dev[0].wait_event(["CTRL-EVENT-CONNECTED"], timeout=30)
     if ev is None:
         raise Exception("Association with the AP timed out")