DPP: Fix EAPOL-Key Key MIC calculation
The Key MIC field value got truncated for all cases and incorrect HMAC hash algorithm was used for the SHA512 cases. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
8acde197c2
commit
8b5579e17a
1 changed files with 2 additions and 2 deletions
|
@ -184,7 +184,7 @@ int wpa_eapol_key_mic(const u8 *key, size_t key_len, int akmp, int ver,
|
||||||
if (hmac_sha384(key, key_len, buf, len, hash))
|
if (hmac_sha384(key, key_len, buf, len, hash))
|
||||||
return -1;
|
return -1;
|
||||||
} else if (key_len == 256 / 8) {
|
} else if (key_len == 256 / 8) {
|
||||||
if (hmac_sha256(key, key_len, buf, len, hash))
|
if (hmac_sha512(key, key_len, buf, len, hash))
|
||||||
return -1;
|
return -1;
|
||||||
} else {
|
} else {
|
||||||
wpa_printf(MSG_INFO,
|
wpa_printf(MSG_INFO,
|
||||||
|
@ -192,7 +192,7 @@ int wpa_eapol_key_mic(const u8 *key, size_t key_len, int akmp, int ver,
|
||||||
(unsigned int) key_len);
|
(unsigned int) key_len);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
os_memcpy(mic, hash, key_len / 8);
|
os_memcpy(mic, hash, key_len);
|
||||||
break;
|
break;
|
||||||
#endif /* CONFIG_DPP */
|
#endif /* CONFIG_DPP */
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue