[PATCH 02/29] tests: Add PASN hwsim test cases for SAE-EXT-KEY AKM with different groups

Sai Pratyusha Magam smagam at qti.qualcomm.com
Thu Dec 11 05:14:16 PST 2025


From: Ainy Kumari <ainy.kumari at oss.qualcomm.com>

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 at oss.qualcomm.com>
---
 tests/hwsim/test_pasn.py | 22 ++++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/tests/hwsim/test_pasn.py b/tests/hwsim/test_pasn.py
index c64e5b566..2b10f1a1e 100644
--- a/tests/hwsim/test_pasn.py
+++ b/tests/hwsim/test_pasn.py
@@ -490,8 +490,20 @@ def test_pasn_sae(dev, apdev):
     finally:
         dev[0].set("sae_pwe", "0")
 
+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)
+
+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)
+
+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)
+
 @remote_compatible
-def test_pasn_sae_ext_key(dev, apdev):
+def run_pasn_sae_ext_key(dev, apdev, group):
     """PASN authentication with SAE-EXT-KEY AP with PMK derivation + PMKSA caching"""
     check_pasn_capab(dev[0])
     check_sae_capab(dev[0])
@@ -500,6 +512,8 @@ def test_pasn_sae_ext_key(dev, apdev):
                                  passphrase="12345678")
     params['wpa_key_mgmt'] = 'SAE SAE-EXT-KEY PASN'
     params['sae_pwe'] = "2"
+    params['pasn_groups'] = "19 20 21"
+    params['sae_groups'] = "19 20 21"
     hapd = start_pasn_ap(apdev[0], params)
 
     try:
@@ -508,17 +522,17 @@ 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")
 
-- 
2.34.1




More information about the Hostap mailing list