]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Addition WPS local error case coverage
authorJouni Malinen <jouni@codeaurora.org>
Tue, 16 Apr 2019 21:55:16 +0000 (00:55 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 16 Apr 2019 21:55:16 +0000 (00:55 +0300)
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
tests/hwsim/test_ap_wps.py

index e0791a0cae0265ad7822b06213213187f013eea7..c5be553587895761bfcc80491429ab3809ec6dc1 100644 (file)
@@ -9535,6 +9535,18 @@ def test_ap_wps_eap_wsc_errors(dev, apdev):
             wait_scan_stopped(dev[0])
             dev[0].dump_monitor()
 
+    tests = [(1, "wps_decrypt_encr_settings"),
+             (2, "hmac_sha256;wps_derive_psk")]
+    for count, func in tests:
+        hapd.request("WPS_PIN any " + pin)
+        with fail_test(dev[0], count, func):
+            dev[0].request("WPS_PIN %s %s" % (bssid, pin))
+            wait_fail_trigger(dev[0], "GET_FAIL")
+            dev[0].request("WPS_CANCEL")
+            dev[0].wait_disconnected()
+            wait_scan_stopped(dev[0])
+            dev[0].dump_monitor()
+
     with alloc_fail(dev[0], 1, "eap_msg_alloc;eap_sm_build_expanded_nak"):
         dev[0].wps_reg(bssid, appin + " new_ssid=a", "new ssid", "WPA2PSK",
                        "CCMP", "new passphrase", no_wait=True)