Parcourir la source

tests: AP-STA-POSSIBLE-PSK-MISMATCH

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen il y a 10 ans
Parent
commit
97c6d0d873
1 fichiers modifiés avec 13 ajouts et 0 suppressions
  1. 13 0
      tests/hwsim/test_ap_psk.py

+ 13 - 0
tests/hwsim/test_ap_psk.py

@@ -1861,3 +1861,16 @@ def test_ap_wpa2_psk_disable_enable(dev, apdev):
         hapd.request("ENABLE")
         dev[0].wait_connected()
         hwsim_utils.test_connectivity(dev[0], hapd)
+
+def test_ap_wpa2_psk_incorrect_passphrase(dev, apdev):
+    """WPA2-PSK AP and station using incorrect passphrase"""
+    ssid = "test-wpa2-psk"
+    passphrase = 'qwertyuiop'
+    params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase)
+    hapd = hostapd.add_ap(apdev[0]['ifname'], params)
+    dev[0].connect(ssid, psk="incorrect passphrase", scan_freq="2412",
+                   wait_connect=False)
+    ev = hapd.wait_event(["AP-STA-POSSIBLE-PSK-MISMATCH"], timeout=10)
+    if ev is None:
+        raise Exception("No AP-STA-POSSIBLE-PSK-MISMATCH reported")
+    print ev