tests: AP config using wps_config command with invalid passphrase
authorJouni Malinen <jouni@qca.qualcomm.com>
Wed, 5 Aug 2015 21:02:47 +0000 (00:02 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 6 Aug 2015 17:47:25 +0000 (20:47 +0300)
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
tests/hwsim/test_ap_wps.py

index b4e1cc6..cc1c139 100644 (file)
@@ -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"