From: Ainy Kumari Date: Fri, 28 Nov 2025 08:20:19 +0000 (+0530) Subject: tests: Add PASN hwsim test cases for SAE-EXT-KEY AKM with different groups X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c0241576092e5eff9885f195c03ed8df43d6d4db;p=thirdparty%2Fhostap.git tests: Add PASN hwsim test cases for SAE-EXT-KEY AKM with different groups Introduce additional hwsim test cases to validate PASN authentication using SAE-EXT-KEY AKM for groups 19, 20 and 21. Signed-off-by: Ainy Kumari --- diff --git a/tests/hwsim/test_pasn.py b/tests/hwsim/test_pasn.py index c64e5b566..02408b669 100644 --- a/tests/hwsim/test_pasn.py +++ b/tests/hwsim/test_pasn.py @@ -493,6 +493,24 @@ def test_pasn_sae(dev, apdev): @remote_compatible def test_pasn_sae_ext_key(dev, apdev): """PASN authentication with SAE-EXT-KEY AP with PMK derivation + PMKSA caching""" + run_pasn_sae_ext_key(dev, apdev, None) + +@remote_compatible +def test_pasn_sae_ext_key_19(dev, apdev): + """PASN Authentication with SAE-EXT-KEY AKM (group 19)""" + run_pasn_sae_ext_key(dev, apdev, 19) + +@remote_compatible +def test_pasn_sae_ext_key_20(dev, apdev): + """PASN Authentication with SAE-EXT-KEY AKM (group 20)""" + run_pasn_sae_ext_key(dev, apdev, 20) + +@remote_compatible +def test_pasn_sae_ext_key_21(dev, apdev): + """PASN Authentication with SAE-EXT-KEY AKM (group 21)""" + run_pasn_sae_ext_key(dev, apdev, 21) + +def run_pasn_sae_ext_key(dev, apdev, group): check_pasn_capab(dev[0]) check_sae_capab(dev[0]) @@ -500,6 +518,11 @@ def test_pasn_sae_ext_key(dev, apdev): passphrase="12345678") params['wpa_key_mgmt'] = 'SAE SAE-EXT-KEY PASN' params['sae_pwe'] = "2" + if group: + params['pasn_groups'] = "19 20 21" + params['sae_groups'] = "19 20 21" + else: + group = "19" hapd = start_pasn_ap(apdev[0], params) try: @@ -508,17 +531,19 @@ def test_pasn_sae_ext_key(dev, apdev): scan_freq="2412", only_add_network=True) # first test with a valid PSK - check_pasn_akmp_cipher(dev[0], hapd, "SAE-EXT-KEY", "CCMP", nid="0") + check_pasn_akmp_cipher(dev[0], hapd, "SAE-EXT-KEY", "CCMP", group=group, + nid="0") # And now with PMKSA caching - check_pasn_akmp_cipher(dev[0], hapd, "SAE-EXT-KEY", "CCMP") + check_pasn_akmp_cipher(dev[0], hapd, "SAE-EXT-KEY", "CCMP", group=group) # And now with a wrong passphrase if "FAIL" in dev[0].request("PMKSA_FLUSH"): raise Exception("PMKSA_FLUSH failed") dev[0].set_network_quoted(0, "psk", "12345678787") - check_pasn_akmp_cipher(dev[0], hapd, "SAE-EXT-KEY", "CCMP", status=1, nid="0") + check_pasn_akmp_cipher(dev[0], hapd, "SAE-EXT-KEY", "CCMP", group=group, + status=1, nid="0") finally: dev[0].set("sae_pwe", "0")