Use PMK_LEN macro instead of hardcoded value 64 (= 2 * 32)
Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
f5da5810c9
commit
838180877f
1 changed files with 2 additions and 1 deletions
|
@ -377,7 +377,8 @@ static int hostapd_config_read_wpa_psk(const char *fname,
|
|||
|
||||
ok = 0;
|
||||
len = os_strlen(pos);
|
||||
if (len == 64 && hexstr2bin(pos, psk->psk, PMK_LEN) == 0)
|
||||
if (len == 2 * PMK_LEN &&
|
||||
hexstr2bin(pos, psk->psk, PMK_LEN) == 0)
|
||||
ok = 1;
|
||||
else if (len >= 8 && len < 64 &&
|
||||
pbkdf2_sha1(pos, ssid->ssid, ssid->ssid_len,
|
||||
|
|
Loading…
Reference in a new issue