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": if l == "# WPA PSKs":
continue continue
vals = l.split(' ') vals = l.split(' ')
if len(vals) == 2: if len(vals) != 3 or vals[0] != "wps=1":
addr = vals[0]
psk = vals[1]
elif len(vals) == 3 and vals[0] == "wps=1":
addr = vals[1]
psk = vals[2]
else:
continue continue
addr = vals[1]
psk = vals[2]
psks[addr] = psk psks[addr] = psk
return psks return psks