]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: SAE anti clogging (forced, H2E)
authorJouni Malinen <jouni@codeaurora.org>
Mon, 20 Jan 2020 18:25:29 +0000 (20:25 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 20 Jan 2020 19:17:46 +0000 (21:17 +0200)
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
tests/hwsim/test_sae.py

index aa21f197fd6b697f280cb81d3a602d4363ff6bd5..978c28f683ff0a1714008a630f14fe32af2f4957 100644 (file)
@@ -2250,3 +2250,24 @@ def run_sae_h2e_rsnxe_mismatch_ap(dev, apdev, rsnxe):
     finally:
         dev[0].set("sae_groups", "")
         dev[0].set("sae_pwe", "0")
+
+def test_sae_forced_anti_clogging_h2e(dev, apdev):
+    """SAE anti clogging (forced, H2E)"""
+    if "SAE" not in dev[0].get_capability("auth_alg") or \
+       "SAE" not in dev[1].get_capability("auth_alg"):
+        raise HwsimSkip("SAE not supported")
+    params = hostapd.wpa2_params(ssid="test-sae", passphrase="12345678")
+    params['wpa_key_mgmt'] = 'SAE WPA-PSK'
+    params['sae_pwe'] = "1"
+    params['sae_anti_clogging_threshold'] = '0'
+    hostapd.add_ap(apdev[0], params)
+    dev[2].connect("test-sae", psk="12345678", scan_freq="2412")
+    try:
+        for i in range(2):
+            dev[i].request("SET sae_groups ")
+            dev[i].set("sae_pwe", "1")
+            dev[i].connect("test-sae", psk="12345678", key_mgmt="SAE",
+                           scan_freq="2412")
+    finally:
+        for i in range(2):
+            dev[i].set("sae_pwe", "0")