]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: SAE reauthentication
authorJouni Malinen <jouni@codeaurora.org>
Tue, 5 Jun 2018 22:27:00 +0000 (01:27 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 6 Jun 2018 20:59:46 +0000 (23:59 +0300)
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
tests/hwsim/test_sae.py

index cdcabf8b2d6360a9615f186dabc8b6dbc4f6a406..f966d924026a2a0fad30437619eb5178f9873aea 100644 (file)
@@ -1294,3 +1294,25 @@ def test_sae_forced_anti_clogging_pw_id(dev, apdev):
         dev[i].request("SET sae_groups ")
         dev[i].connect("test-sae", sae_password="secret",
                        sae_password_id=29*'A', key_mgmt="SAE", scan_freq="2412")
+
+def test_sae_reauth(dev, apdev):
+    """SAE reauthentication"""
+    if "SAE" not in dev[0].get_capability("auth_alg"):
+        raise HwsimSkip("SAE not supported")
+    params = hostapd.wpa2_params(ssid="test-sae",
+                                 passphrase="12345678")
+    params['wpa_key_mgmt'] = 'SAE'
+    params["ieee80211w"] = "2"
+    hapd = hostapd.add_ap(apdev[0], params)
+
+    dev[0].request("SET sae_groups ")
+    id = dev[0].connect("test-sae", psk="12345678", key_mgmt="SAE",
+                        ieee80211w="2", scan_freq="2412")
+
+    hapd.set("ext_mgmt_frame_handling", "1")
+    dev[0].request("DISCONNECT")
+    dev[0].wait_disconnected(timeout=10)
+    hapd.set("ext_mgmt_frame_handling", "0")
+    dev[0].request("PMKSA_FLUSH")
+    dev[0].request("REASSOCIATE")
+    dev[0].wait_connected(timeout=10, error="Timeout on re-connection")