OWE: Set PMK length properly on supplicant side

sm->pmk_len was not set when deriving the PMK as part of OWE key
generation. This depending on wpa_sm_set_pmk_from_pmksa() call resetting
the value to the default. While this worked for many cases, this is not
correct and can have issues with network profile selection based on
association information. For example, the OWE transition mode cases
would hit an issue here.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2017-10-08 12:29:33 +03:00 committed by Jouni Malinen
parent ea079153f4
commit 675112df1b
2 changed files with 7 additions and 0 deletions

View file

@ -4291,6 +4291,7 @@ int owe_process_assoc_resp(struct wpa_sm *sm, const u8 *resp_ies,
os_memset(prk, 0, SHA256_MAC_LEN);
if (res < 0)
return -1;
sm->pmk_len = PMK_LEN;
wpa_hexdump_key(MSG_DEBUG, "OWE: PMK", sm->pmk, PMK_LEN);
wpa_hexdump(MSG_DEBUG, "OWE: PMKID", pmkid, PMKID_LEN);