aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2017-12-02 10:12:27 (GMT)
committerJouni Malinen <j@w1.fi>2017-12-02 10:14:55 (GMT)
commit59642ca9569d3592f5e3d2b0d34c6a4910c53cb2 (patch)
tree73c6d9062cf7a6870a8e0c528821c6aec63bf58c
parent70dcb4aa0eda857a3475f3c84f8b02b186734317 (diff)
downloadhostap-59642ca9569d3592f5e3d2b0d34c6a4910c53cb2.zip
hostap-59642ca9569d3592f5e3d2b0d34c6a4910c53cb2.tar.gz
hostap-59642ca9569d3592f5e3d2b0d34c6a4910c53cb2.tar.bz2
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 <jouni@qca.qualcomm.com>
-rw-r--r--tests/hwsim/test_ap_wps.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/hwsim/test_ap_wps.py b/tests/hwsim/test_ap_wps.py
index f2e894d..c16c5cb 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")