From 2ba7867e9f5b1432532a00fe61327323b5e7f6b1 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Tue, 5 May 2015 22:01:53 -0500 Subject: [PATCH] eapol: Drop unneded check in verify_ptk_4_of_4 Step 4 is always sent without encrypted Key Data according to Section 11.6.6.5. In the case of WPA, Encrypted Key Data field is reserved, and should always be 0. Thus it is safe to drop the !is_wpa condition. --- src/eapol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/eapol.c b/src/eapol.c index 9ca5ed39..9c7b9d32 100644 --- a/src/eapol.c +++ b/src/eapol.c @@ -367,7 +367,7 @@ bool eapol_verify_ptk_4_of_4(const struct eapol_key *ek, bool is_wpa) if (ek->secure != !is_wpa) return false; - if (ek->encrypted_key_data && !is_wpa) + if (ek->encrypted_key_data) return false; key_len = L_BE16_TO_CPU(ek->key_length);