From: Jouni Malinen Date: Fri, 28 Feb 2020 21:19:52 +0000 (+0200) Subject: tests: Initialize wlantest with passphrase for ap_wpa2_ptk_rekey X-Git-Tag: hostap_2_10~1730 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9551930f1eef45dfbc4303b338f4690314867ee1;p=thirdparty%2Fhostap.git tests: Initialize wlantest with passphrase for ap_wpa2_ptk_rekey Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_ap_psk.py b/tests/hwsim/test_ap_psk.py index 2f2a354a5..12274fdd0 100644 --- a/tests/hwsim/test_ap_psk.py +++ b/tests/hwsim/test_ap_psk.py @@ -23,7 +23,7 @@ from utils import HwsimSkip, fail_test, skip_with_fips, start_monitor, stop_moni import hwsim_utils from wpasupplicant import WpaSupplicant from tshark import run_tshark -from wlantest import WlantestCapture +from wlantest import WlantestCapture, Wlantest def check_mib(dev, vals): mib = dev.get_mib() @@ -210,6 +210,12 @@ def test_ap_wpa2_ptk_rekey(dev, apdev): passphrase = 'qwertyuiop' params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase) hapd = hostapd.add_ap(apdev[0], params) + + Wlantest.setup(hapd) + wt = Wlantest() + wt.flush() + wt.add_passphrase(passphrase) + dev[0].connect(ssid, psk=passphrase, wpa_ptk_rekey="1", scan_freq="2412") ev = dev[0].wait_event(["WPA: Key negotiation completed", "CTRL-EVENT-DISCONNECTED"])