]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Add PASN hwsim test cases for SAE-EXT-KEY AKM with different groups
authorAiny Kumari <ainy.kumari@oss.qualcomm.com>
Fri, 28 Nov 2025 08:20:19 +0000 (13:50 +0530)
committerJouni Malinen <j@w1.fi>
Thu, 18 Dec 2025 10:08:24 +0000 (12:08 +0200)
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 <ainy.kumari@oss.qualcomm.com>
tests/hwsim/test_pasn.py

index c64e5b566c28d84c7967e05c5a4f841b3945d775..02408b6691ee27bbab650ef53a9af070afed0b19 100644 (file)
@@ -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")