]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Update sae_pmk_lifetime to match implementation
authorJouni Malinen <jouni@codeaurora.org>
Mon, 18 Oct 2021 18:21:07 +0000 (21:21 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 18 Oct 2021 18:21:07 +0000 (21:21 +0300)
The current PMKSA cache entry with SAE does not expire during the
association anymore.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
tests/hwsim/test_sae.py

index 9925d98f3a7c52e90d728f9f2fd19b7f81ef93d4..a8a4ac00c85621b2fdbec3a3c7d5ae6ee3596506 100644 (file)
@@ -2588,7 +2588,7 @@ def test_sae_okc_pmk_lifetime(dev, apdev):
         raise Exception("SAE authentication not used during roam to AP2 after reauth threshold")
 
 def test_sae_pmk_lifetime(dev, apdev):
-    """SAE and opportunistic key caching and PMK lifetime"""
+    """SAE and PMK lifetime"""
     check_sae_capab(dev[0])
     params = hostapd.wpa2_params(ssid="test-sae", passphrase="12345678")
     params['wpa_key_mgmt'] = 'SAE'
@@ -2632,19 +2632,8 @@ def test_sae_pmk_lifetime(dev, apdev):
     ev = dev[0].wait_event(["PMKSA-CACHE-REMOVED"], 11)
     if ev is None:
         raise Exception("PMKSA cache entry did not expire")
-    if bssid2 not in ev:
-        ev = dev[0].wait_event(["PMKSA-CACHE-REMOVED"], 11)
-        if ev is None:
-            raise Exception("PMKSA cache entry did not expire")
-        if bssid2 not in ev:
-            raise Exception("PMKSA cache entry for the current AP did not expire")
-    ev = dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], 1)
-    if ev is None:
-        raise Exception("Disconnection not reported after PMKSA cache entry expiration")
-
-    dev[0].wait_connected()
-    if "sae_group" not in dev[0].get_status():
-        raise Exception("SAE authentication not used after PMKSA cache entry expiration")
+    if bssid2 in ev:
+        raise Exception("Unexpected expiration of the current SAE PMKSA cache entry")
 
 def test_sae_and_psk_multiple_passwords(dev, apdev, params):
     """SAE and PSK with multiple passwords/passphrases"""