]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: sigma_dut and AP enabling two pairwise ciphers
authorJouni Malinen <jouni@qca.qualcomm.com>
Fri, 17 Nov 2017 10:33:08 +0000 (12:33 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 17 Nov 2017 10:33:54 +0000 (12:33 +0200)
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
tests/hwsim/test_sigma_dut.py

index 471f67005c18ebd6962b0f1c261cb1a887eb1fdf..68e2a5f2eaf0ce3732f6205e6009442a45692648 100644 (file)
@@ -505,8 +505,18 @@ def test_sigma_dut_ap_cipher_ccmp_256(dev, apdev, params):
     run_sigma_dut_ap_cipher(dev, apdev, params, "AES-CCMP-256", "BIP-CMAC-256",
                             "CCMP-256")
 
+def test_sigma_dut_ap_cipher_ccmp_gcmp_1(dev, apdev, params):
+    """sigma_dut controlled AP with CCMP-128+GCMP-256 ciphers (1)"""
+    run_sigma_dut_ap_cipher(dev, apdev, params, "AES-CCMP-128 AES-GCMP-256",
+                            "BIP-GMAC-256", "CCMP")
+
+def test_sigma_dut_ap_cipher_ccmp_gcmp_2(dev, apdev, params):
+    """sigma_dut controlled AP with CCMP-128+GCMP-256 ciphers (2)"""
+    run_sigma_dut_ap_cipher(dev, apdev, params, "AES-CCMP-128 AES-GCMP-256",
+                            "BIP-GMAC-256", "GCMP-256", "CCMP")
+
 def run_sigma_dut_ap_cipher(dev, apdev, params, ap_pairwise, ap_group_mgmt,
-                            sta_cipher):
+                            sta_cipher, sta_cipher_group=None):
     check_suite_b_192_capa(dev)
     logdir = os.path.join(params['logdir'],
                           "sigma_dut_ap_cipher.sigma-hostapd")
@@ -525,6 +535,8 @@ def run_sigma_dut_ap_cipher(dev, apdev, params, ap_pairwise, ap_group_mgmt,
             sigma_dut_cmd_check("ap_set_security,NAME,AP,KEYMGNT,SuiteB,PMF,Required,PairwiseCipher,%s,GroupMgntCipher,%s" % (ap_pairwise, ap_group_mgmt))
             sigma_dut_cmd_check("ap_config_commit,NAME,AP")
 
+            if sta_cipher_group is None:
+                sta_cipher_group = sta_cipher
             dev[0].connect("test-suite-b", key_mgmt="WPA-EAP-SUITE-B-192",
                            ieee80211w="2",
                            openssl_ciphers="SUITEB192",
@@ -532,7 +544,7 @@ def run_sigma_dut_ap_cipher(dev, apdev, params, ap_pairwise, ap_group_mgmt,
                            ca_cert="auth_serv/ec2-ca.pem",
                            client_cert="auth_serv/ec2-user.pem",
                            private_key="auth_serv/ec2-user.key",
-                           pairwise=sta_cipher, group=sta_cipher,
+                           pairwise=sta_cipher, group=sta_cipher_group,
                            scan_freq="2412")
 
             sigma_dut_cmd_check("ap_reset_default")