]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: SAE Authetication failure reporting
authorJouni Malinen <jouni@codeaurora.org>
Wed, 14 Jul 2021 10:04:13 +0000 (13:04 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 14 Jul 2021 15:18:47 +0000 (18:18 +0300)
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
tests/hwsim/test_sae.py

index 159678e0c7be8081e07fb247f325921b7ae709cd..9925d98f3a7c52e90d728f9f2fd19b7f81ef93d4 100644 (file)
@@ -2775,3 +2775,19 @@ def test_sae_ocv_pmk_failure(dev, apdev):
         raise Exception("hostapd did not report correct PMK after disconnection")
     if pmk_w2 != pmk_w:
         raise Exception("wpa_supplicant did not report correct PMK after disconnection")
+
+def test_sae_reject(dev, apdev):
+    """SAE and AP rejecting connection"""
+    check_sae_capab(dev[0])
+    params = hostapd.wpa2_params(ssid="test-sae",
+                                 passphrase="12345678")
+    params['wpa_key_mgmt'] = 'SAE'
+    params['max_num_sta'] = '0'
+    hapd = hostapd.add_ap(apdev[0], params)
+    dev[0].set("sae_groups", "")
+    id = dev[0].connect("test-sae", psk="12345678", key_mgmt="SAE",
+                        scan_freq="2412", wait_connect=False)
+    if not dev[0].wait_event(["CTRL-EVENT-AUTH-REJECT"], timeout=10):
+        raise Exception("Authentication rejection not reported")
+    dev[0].request("REMOVE_NETWORK all")
+    dev[0].dump_monitor()