]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Make ap_wps_ap_scan_2 work with multiple AES-ciphers
authorJouni Malinen <jouni@qca.qualcomm.com>
Sat, 2 Dec 2017 10:12:27 +0000 (12:12 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 2 Dec 2017 10:14:55 +0000 (12:14 +0200)
This test case is not really realistic and the second connection attempt
would fail if additional AES-based ciphers get provisioned. Work this
around by dropping to CCMP only if other ciphers are present.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
tests/hwsim/test_ap_wps.py

index f2e894df8c2ce915d8769aab17d36f3a84c1d4ef..c16c5cb71aa08913f47530d4b1b6adef559208b1 100644 (file)
@@ -3594,6 +3594,17 @@ def test_ap_wps_ap_scan_2(dev, apdev):
     wpas.wait_connected(timeout=30)
     wpas.dump_monitor()
     wpas.request("DISCONNECT")
+    wpas.wait_disconnected()
+    id = wpas.list_networks()[0]['id']
+    pairwise = wpas.get_network(id, "pairwise")
+    if "CCMP" not in pairwise.split():
+        raise Exception("Unexpected pairwise parameter value: " + pairwise)
+    group = wpas.get_network(id, "group")
+    if "CCMP" not in group.split():
+        raise Exception("Unexpected group parameter value: " + group)
+    # Need to select a single cipher for ap_scan=2 testing
+    wpas.set_network(id, "pairwise", "CCMP")
+    wpas.set_network(id, "group", "CCMP")
     wpas.request("BSS_FLUSH 0")
     wpas.dump_monitor()
     wpas.request("REASSOCIATE")