From: Jouni Malinen Date: Sat, 2 Dec 2017 10:12:27 +0000 (+0200) Subject: tests: Make ap_wps_ap_scan_2 work with multiple AES-ciphers X-Git-Tag: hostap_2_7~733 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=59642ca9569d3592f5e3d2b0d34c6a4910c53cb2;p=thirdparty%2Fhostap.git tests: Make ap_wps_ap_scan_2 work with multiple AES-ciphers 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 --- diff --git a/tests/hwsim/test_ap_wps.py b/tests/hwsim/test_ap_wps.py index f2e894df8..c16c5cb71 100644 --- a/tests/hwsim/test_ap_wps.py +++ b/tests/hwsim/test_ap_wps.py @@ -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")