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:
parent
fde8e79463
commit
68e9b8cb16
1 changed files with 9 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue