]> git.ipfire.org Git - thirdparty/hostap.git/blobdiff - tests/hwsim/test_wep.py
tests: Verify that wpa_supplicant clears keys from memory
[thirdparty/hostap.git] / tests / hwsim / test_wep.py
index 7237aaf4f99b2b085d3b795b6a8bf50f74996fe7..bd8fec067586f3692a2329cff87b8873d012bac8 100644 (file)
@@ -12,6 +12,7 @@ def test_wep_open_auth(dev, apdev):
     hapd = hostapd.add_ap(apdev[0]['ifname'],
                           { "ssid": "wep-open",
                             "wep_key0": '"hello"' })
+    dev[0].flush_scan_cache()
     dev[0].connect("wep-open", key_mgmt="NONE", wep_key0='"hello"',
                    scan_freq="2412")
     hwsim_utils.test_connectivity(dev[0], hapd)
@@ -77,7 +78,5 @@ def test_wep_shared_key_auth_multi_key(dev, apdev):
 
     dev[2].set_network(id, "wep_tx_keyidx", "1")
     dev[2].request("REASSOCIATE")
-    ev = dev[2].wait_event(["CTRL-EVENT-CONNECTED"], timeout=10)
-    if ev is None:
-        raise Exception("Reassociation with the AP timed out")
+    dev[2].wait_connected(timeout=10, error="Reassociation timed out")
     hwsim_utils.test_connectivity(dev[2], hapd)