From: Jouni Malinen Date: Sat, 15 Feb 2020 15:37:07 +0000 (+0200) Subject: tests: Prepare ap_wps_per_station_psk for the new wps=1 tag in PSK file X-Git-Tag: hostap_2_10~1832 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68e9b8cb162c5ba73043d157a7e865f97462fe21;p=thirdparty%2Fhostap.git tests: Prepare ap_wps_per_station_psk for the new wps=1 tag in PSK file Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_ap_wps.py b/tests/hwsim/test_ap_wps.py index 93b84cdaa..81475578b 100644 --- a/tests/hwsim/test_ap_wps.py +++ b/tests/hwsim/test_ap_wps.py @@ -2161,7 +2161,15 @@ def get_psk(pskfile): for l in lines: if l == "# WPA PSKs": continue - (addr, psk) = l.split(' ') + vals = l.split(' ') + if len(vals) == 2: + addr = vals[0] + psk = vals[1] + elif len(vals) == 3 and vals[0] == "wps=1": + addr = vals[1] + psk = vals[2] + else: + continue psks[addr] = psk return psks