From e1eb0e9e6e56b94ce28e9560abf834ba8a09c59e Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 6 Aug 2015 00:02:47 +0300 Subject: [PATCH] tests: AP config using wps_config command with invalid passphrase Signed-off-by: Jouni Malinen --- tests/hwsim/test_ap_wps.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/hwsim/test_ap_wps.py b/tests/hwsim/test_ap_wps.py index b4e1cc63d..cc1c13976 100644 --- a/tests/hwsim/test_ap_wps.py +++ b/tests/hwsim/test_ap_wps.py @@ -166,6 +166,15 @@ def test_ap_wps_init_through_wps_config(dev, apdev): dev[0].connect(ssid, psk="12345678", scan_freq="2412", proto="WPA2", pairwise="CCMP", group="CCMP") +def test_ap_wps_invalid_wps_config_passphrase(dev, apdev): + """AP configuration using wps_config command with invalid passphrase""" + ssid = "test-wps-init-config" + hostapd.add_ap(apdev[0]['ifname'], + { "ssid": ssid, "eap_server": "1", "wps_state": "1" }) + hapd = hostapd.Hostapd(apdev[0]['ifname']) + if "FAIL" not in hapd.request("WPS_CONFIG " + ssid.encode("hex") + " WPA2PSK CCMP " + "1234567".encode("hex")): + raise Exception("Invalid WPS_CONFIG command accepted") + def test_ap_wps_conf(dev, apdev): """WPS PBC provisioning with configured AP""" ssid = "test-wps-conf"