]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: AP configuration attempt using wps_config when WPS is disabled
authorJouni Malinen <jouni@codeaurora.org>
Thu, 14 Oct 2021 13:35:16 +0000 (16:35 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 14 Oct 2021 13:38:40 +0000 (16:38 +0300)
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
tests/hwsim/test_ap_wps.py

index 4577177d37fb3953752f23aaa6e8da51754fb30b..62972ac703fd0579ac03b8c3a5991f7e9af3b256 100644 (file)
@@ -10599,3 +10599,10 @@ def test_ap_wps_registrar_init_errors(dev, apdev):
         with alloc_fail(hapd, count, func):
             if "FAIL" not in hapd.request("ENABLE"):
                 raise Exception("ENABLE succeeded unexpectedly")
+
+def test_ap_wps_config_without_wps(dev, apdev):
+    """AP configuration attempt using wps_config when WPS is disabled"""
+    ssid = "test-wps-init-config"
+    hapd = hostapd.add_ap(apdev[0], {"ssid": ssid})
+    if "FAIL" not in hapd.request("WPS_CONFIG " + binascii.hexlify(ssid.encode()).decode() + " WPA2PSK CCMP " + binascii.hexlify(b"12345678").decode()):
+        raise Exception("WPS_CONFIG command succeeded unexpectedly")