From 2fdd40ae2dbbbafefd6a911a31344eec44035814 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 14 Oct 2021 16:35:16 +0300 Subject: [PATCH] tests: AP configuration attempt using wps_config when WPS is disabled Signed-off-by: Jouni Malinen --- tests/hwsim/test_ap_wps.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/hwsim/test_ap_wps.py b/tests/hwsim/test_ap_wps.py index 4577177d3..62972ac70 100644 --- a/tests/hwsim/test_ap_wps.py +++ b/tests/hwsim/test_ap_wps.py @@ -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")