tests: Prepare ap_wps_per_station_psk for the new wps=1 tag in PSK file

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2020-02-15 17:37:07 +02:00
parent fde8e79463
commit 68e9b8cb16

View file

@ -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