mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 14:49:24 +01:00
eapol: Update _verify_ptk_3_of_4 to work with no MIC
A similar change was made to _verify_gtk_1_of_2 in order for verification to work when no MIC is being used (FILS rekeys)
This commit is contained in:
parent
8ceb4a31ef
commit
733679ff7f
@ -478,7 +478,8 @@ bool eapol_verify_ptk_2_of_4(const struct eapol_key *ek)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool eapol_verify_ptk_3_of_4(const struct eapol_key *ek, bool is_wpa)
|
||||
bool eapol_verify_ptk_3_of_4(const struct eapol_key *ek, bool is_wpa,
|
||||
size_t mic_len)
|
||||
{
|
||||
uint16_t key_len;
|
||||
|
||||
@ -497,7 +498,7 @@ bool eapol_verify_ptk_3_of_4(const struct eapol_key *ek, bool is_wpa)
|
||||
if (!ek->key_ack)
|
||||
return false;
|
||||
|
||||
if (!ek->key_mic)
|
||||
if (mic_len && !ek->key_mic)
|
||||
return false;
|
||||
|
||||
if (ek->secure != !is_wpa)
|
||||
@ -1449,7 +1450,7 @@ static void eapol_handle_ptk_3_of_4(struct eapol_sm *sm,
|
||||
|
||||
l_debug("ifindex=%u", sm->handshake->ifindex);
|
||||
|
||||
if (!eapol_verify_ptk_3_of_4(ek, sm->handshake->wpa_ie)) {
|
||||
if (!eapol_verify_ptk_3_of_4(ek, sm->handshake->wpa_ie, sm->mic_len)) {
|
||||
handshake_failed(sm, MMPDU_REASON_CODE_UNSPECIFIED);
|
||||
return;
|
||||
}
|
||||
|
@ -63,7 +63,8 @@ uint8_t *eapol_decrypt_key_data(enum ie_rsn_akm_suite akm, const uint8_t *kek,
|
||||
|
||||
bool eapol_verify_ptk_1_of_4(const struct eapol_key *ek, size_t mic_len);
|
||||
bool eapol_verify_ptk_2_of_4(const struct eapol_key *ek);
|
||||
bool eapol_verify_ptk_3_of_4(const struct eapol_key *ek, bool is_wpa);
|
||||
bool eapol_verify_ptk_3_of_4(const struct eapol_key *ek, bool is_wpa,
|
||||
size_t mic_len);
|
||||
bool eapol_verify_ptk_4_of_4(const struct eapol_key *ek, bool is_wpa);
|
||||
bool eapol_verify_gtk_1_of_2(const struct eapol_key *ek, bool is_wpa,
|
||||
size_t mic_len);
|
||||
|
Loading…
Reference in New Issue
Block a user