diff mbox series

[4/6] eapol: use handshake_state_pmkid_matches

Message ID 20230619225746.462791-4-prestwoj@gmail.com (mailing list archive)
State New
Headers show
Series [1/6] handshake: add force_sha1 flag to handshake_state_get_pmkid() | expand

Commit Message

James Prestwood June 19, 2023, 10:57 p.m. UTC
This allows compatibility with older hostapd versions using the
SHA1 derivation for the FT-8021X AKM.
---
 src/eapol.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/src/eapol.c b/src/eapol.c
index 354b8fe7..7db6148e 100644
--- a/src/eapol.c
+++ b/src/eapol.c
@@ -1234,12 +1234,7 @@  static void eapol_handle_ptk_1_of_4(struct eapol_sm *sm,
 		if (!found)
 			goto error_unspecified;
 	} else if (pmkid) {
-		uint8_t own_pmkid[16];
-
-		if (!handshake_state_get_pmkid(sm->handshake, own_pmkid, false))
-			goto error_unspecified;
-
-		if (l_secure_memcmp(pmkid, own_pmkid, 16)) {
+		if (!handshake_state_pmkid_matches(sm->handshake, pmkid)) {
 			l_debug("Authenticator sent a PMKID that didn't match");
 
 			/*