[PATCH 37/55] tests: FT-EAP PTK rekey after encrypted reassociation
Ilan Peer
ilan.peer at intel.com
Thu Dec 3 02:44:36 PST 2026
Verify that a PTK rekey initiated by the STA after a fast BSS transition
with encrypted reassociation installs the new PTK on the target AP, both
with and without PMKR0Name privacy.
Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
tests/hwsim/test_ap_ft.py | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/tests/hwsim/test_ap_ft.py b/tests/hwsim/test_ap_ft.py
index 3e5a89a9061b..ad6e31af4154 100644
--- a/tests/hwsim/test_ap_ft.py
+++ b/tests/hwsim/test_ap_ft.py
@@ -4026,7 +4026,8 @@ def ft_pmk_r0_names(capfile, sta):
def run_ap_ft_enc_assoc(dev, apdev, params, sha384=False, roams=1,
ap_privacy=False, sta_privacy=False,
- r1_push=True, eap_over_auth=False, mac_addr=None):
+ r1_push=True, eap_over_auth=False, mac_addr=None,
+ ptk_rekey=False):
capfile = os.path.join(params['logdir'], "hwsim0.pcapng")
ssid = "test-ft"
passphrase = "12345678"
@@ -4057,7 +4058,10 @@ def run_ap_ft_enc_assoc(dev, apdev, params, sha384=False, roams=1,
sha384=sha384, ieee80211w="2", roams=roams,
force_initial_conn_to_first_ap=eap_over_auth,
eap_over_auth=eap_over_auth, pmksa_privacy=sta_privacy,
- mac_addr=mac_addr)
+ mac_addr=mac_addr, ptk_rekey="1" if ptk_rekey else "0",
+ only_one_way=ptk_rekey)
+ if ptk_rekey:
+ check_ptk_rekey(dev[0], hapds[0], hapds[1])
sta = dev[0].own_addr()
ft_enc_assoc_check_capture(capfile, sta,
@@ -4089,6 +4093,15 @@ def test_ap_ft_eap_sha384_enc_assoc(dev, apdev, params):
check_suite_b_192_capa(dev)
run_ap_ft_enc_assoc(dev, apdev, params, sha384=True)
+def test_ap_ft_eap_enc_assoc_ptk_rekey(dev, apdev, params):
+ """FT-EAP with encrypted reassociation and PTK rekey after roam"""
+ run_ap_ft_enc_assoc(dev, apdev, params, ptk_rekey=True)
+
+def test_ap_ft_eap_enc_assoc_pmksa_privacy_ptk_rekey(dev, apdev, params):
+ """FT-EAP with PMKR0Name privacy and PTK rekey after roam"""
+ run_ap_ft_enc_assoc(dev, apdev, params, ap_privacy=True,
+ sta_privacy=True, ptk_rekey=True)
+
def test_ap_ft_eap_enc_assoc_multi(dev, apdev, params):
"""FT-EAP with encrypted reassociation, multiple roams"""
run_ap_ft_enc_assoc(dev, apdev, params, roams=5)
--
2.55.0
More information about the Hostap
mailing list