mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-20 09:34:06 +01:00
handshake: add handshake_state_remove_pmksa
This is needed in order to clear the PMKSA from the handshake state without actually putting it back into the cache. This is something that will be needed in case the AP rejects the association due to an expired (or forgotten) PMKSA.
This commit is contained in:
parent
c36358cc7c
commit
4680c0c13b
@ -1280,3 +1280,19 @@ void handshake_state_cache_pmksa(struct handshake_state *s)
|
||||
if (L_WARN_ON(pmksa_cache_put(pmksa) < 0))
|
||||
l_free(pmksa);
|
||||
}
|
||||
|
||||
bool handshake_state_remove_pmksa(struct handshake_state *s)
|
||||
{
|
||||
struct pmksa *pmksa;
|
||||
|
||||
if (!s->have_pmksa)
|
||||
return false;
|
||||
|
||||
pmksa = handshake_state_steal_pmksa(s);
|
||||
if (!pmksa)
|
||||
return false;
|
||||
|
||||
l_free(pmksa);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -310,6 +310,7 @@ int handshake_state_verify_oci(struct handshake_state *s, const uint8_t *oci,
|
||||
|
||||
bool handshake_state_set_pmksa(struct handshake_state *s, struct pmksa *pmksa);
|
||||
void handshake_state_cache_pmksa(struct handshake_state *s);
|
||||
bool handshake_state_remove_pmksa(struct handshake_state *s);
|
||||
|
||||
bool handshake_util_ap_ie_matches(const struct ie_rsn_info *msg_info,
|
||||
const uint8_t *scan_ie, bool is_wpa);
|
||||
|
Loading…
Reference in New Issue
Block a user