@@ -1527,7 +1527,9 @@ int wpas_parse_pasn_frame(struct pasn_data *pasn, u16 auth_type,
if (pasn->derive_kek) {
wpa_printf(MSG_DEBUG, "PASN: Derive PTK-KEK");
- pasn->kek_len = wpa_kek_len(pasn->akmp, pasn->pmk_len);
+ if (!pasn->kek_len)
+ pasn->kek_len = wpa_kek_len(pasn->akmp,
+ pasn->pmk_len);
wpa_printf(MSG_DEBUG, "PASN: kek_len=%zu", pasn->kek_len);
}
@@ -485,7 +485,9 @@ pasn_derive_keys(struct pasn_data *pasn,
own_addr = pasn->mld_addr;
if (pasn->derive_kek) {
- pasn->kek_len = wpa_kek_len(pasn->akmp, pasn->pmk_len);
+ if (!pasn->kek_len)
+ pasn->kek_len = wpa_kek_len(pasn->akmp,
+ pasn->pmk_len);
wpa_printf(MSG_DEBUG, "PASN: kek_len=%zu", pasn->kek_len);
}
#endif /* CONFIG_ENC_ASSOC */
kek_len may be set outside of PASN module, for example, in P2P2 pairing flows. Don't override it. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> --- src/pasn/pasn_initiator.c | 4 +++- src/pasn/pasn_responder.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-)