]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
FILS: Fix PMK length for initial connection with FILS SHA384 AKM
authorJouni Malinen <jouni@qca.qualcomm.com>
Thu, 16 Feb 2017 19:18:18 +0000 (21:18 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 16 Feb 2017 20:15:29 +0000 (22:15 +0200)
While the FILS authentication cases were already using the proper PMK
length (48 octets instead of the old hardcoded 32 octet), the initial
association case had not yet been updated to cover the new FILS SHA384
AKM and ended up using only a 32-octet PMK. Fix that to use 48-octet PMK
when using FILS SHA384 AKM.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/ap/wpa_auth.c
src/rsn_supp/wpa.c

index 5dcf1e3d2d053d5d48fa295e0894fddd69afe1ee..7b26c04cddf5455543d3b06eb430947e07332194 100644 (file)
@@ -1925,7 +1925,7 @@ SM_STATE(WPA_PTK, INITPMK)
        } else if (wpa_auth_get_msk(sm->wpa_auth, sm->addr, msk, &len) == 0) {
                unsigned int pmk_len;
 
-               if (sm->wpa_key_mgmt & WPA_KEY_MGMT_IEEE8021X_SUITE_B_192)
+               if (wpa_key_mgmt_sha384(sm->wpa_key_mgmt))
                        pmk_len = PMK_LEN_SUITE_B_192;
                else
                        pmk_len = PMK_LEN;
@@ -3775,7 +3775,7 @@ int wpa_auth_pmksa_add(struct wpa_state_machine *sm, const u8 *pmk,
            sm->wpa_auth->conf.disable_pmksa_caching)
                return -1;
 
-       if (sm->wpa_key_mgmt & WPA_KEY_MGMT_IEEE8021X_SUITE_B_192) {
+       if (wpa_key_mgmt_sha384(sm->wpa_key_mgmt)) {
                if (pmk_len > PMK_LEN_SUITE_B_192)
                        pmk_len = PMK_LEN_SUITE_B_192;
        } else if (pmk_len > PMK_LEN) {
index 9c8ed6cb1604b684331c81a8a8ff0934a2aa6e68..a95c794acd855a22f61a77b72f3387a20abeb82c 100644 (file)
@@ -288,7 +288,7 @@ static int wpa_supplicant_get_pmk(struct wpa_sm *sm,
        } else if (wpa_key_mgmt_wpa_ieee8021x(sm->key_mgmt) && sm->eapol) {
                int res, pmk_len;
 
-               if (sm->key_mgmt & WPA_KEY_MGMT_IEEE8021X_SUITE_B_192)
+               if (wpa_key_mgmt_sha384(sm->key_mgmt))
                        pmk_len = PMK_LEN_SUITE_B_192;
                else
                        pmk_len = PMK_LEN;