tests: Require wps=1 tag in ap_wps_per_station_psk

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2020-02-15 17:38:22 +02:00
parent 2bab073dfe
commit afd10e880b

View file

@ -2162,14 +2162,10 @@ def get_psk(pskfile):
if l == "# WPA PSKs":
continue
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:
if len(vals) != 3 or vals[0] != "wps=1":
continue
addr = vals[1]
psk = vals[2]
psks[addr] = psk
return psks