mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-19 03:14:05 -05:00
FT: Add helper function for FILS key storing
FILS calls wpa_ft_store_pmk_r0() from wpa_auth.c. This is moved into a new function wpa_ft_store_pmk_fils() in preparation of additional information being needed. Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
This commit is contained in:
parent
83fe4bd3bf
commit
89dea17e13
@ -2134,8 +2134,7 @@ int fils_auth_pmk_to_ptk(struct wpa_state_machine *sm, const u8 *pmk,
|
||||
wpa_hexdump_key(MSG_DEBUG, "FILS+FT: PMK-R0", pmk_r0, PMK_LEN);
|
||||
wpa_hexdump(MSG_DEBUG, "FILS+FT: PMKR0Name",
|
||||
pmk_r0_name, WPA_PMK_NAME_LEN);
|
||||
wpa_ft_store_pmk_r0(wpa_auth, sm->addr, pmk_r0, pmk_r0_name,
|
||||
sm->pairwise);
|
||||
wpa_ft_store_pmk_fils(sm, pmk_r0, pmk_r0_name);
|
||||
os_memset(fils_ft, 0, sizeof(fils_ft));
|
||||
}
|
||||
#endif /* CONFIG_IEEE80211R_AP */
|
||||
|
@ -892,7 +892,7 @@ void wpa_ft_pmk_cache_deinit(struct wpa_ft_pmk_cache *cache)
|
||||
}
|
||||
|
||||
|
||||
int wpa_ft_store_pmk_r0(struct wpa_authenticator *wpa_auth,
|
||||
static int wpa_ft_store_pmk_r0(struct wpa_authenticator *wpa_auth,
|
||||
const u8 *spa, const u8 *pmk_r0,
|
||||
const u8 *pmk_r0_name, int pairwise)
|
||||
{
|
||||
@ -1517,6 +1517,14 @@ static int wpa_ft_pull_pmk_r1(struct wpa_state_machine *sm,
|
||||
}
|
||||
|
||||
|
||||
int wpa_ft_store_pmk_fils(struct wpa_state_machine *sm,
|
||||
const u8 *pmk_r0, const u8 *pmk_r0_name)
|
||||
{
|
||||
return wpa_ft_store_pmk_r0(sm->wpa_auth, sm->addr, pmk_r0, pmk_r0_name,
|
||||
sm->pairwise);
|
||||
}
|
||||
|
||||
|
||||
int wpa_auth_derive_ptk_ft(struct wpa_state_machine *sm, const u8 *pmk,
|
||||
struct wpa_ptk *ptk)
|
||||
{
|
||||
|
@ -286,9 +286,8 @@ int wpa_auth_derive_ptk_ft(struct wpa_state_machine *sm, const u8 *pmk,
|
||||
struct wpa_ft_pmk_cache * wpa_ft_pmk_cache_init(void);
|
||||
void wpa_ft_pmk_cache_deinit(struct wpa_ft_pmk_cache *cache);
|
||||
void wpa_ft_install_ptk(struct wpa_state_machine *sm);
|
||||
int wpa_ft_store_pmk_r0(struct wpa_authenticator *wpa_auth,
|
||||
const u8 *spa, const u8 *pmk_r0,
|
||||
const u8 *pmk_r0_name, int pairwise);
|
||||
int wpa_ft_store_pmk_fils(struct wpa_state_machine *sm, const u8 *pmk_r0,
|
||||
const u8 *pmk_r0_name);
|
||||
#endif /* CONFIG_IEEE80211R_AP */
|
||||
|
||||
#endif /* WPA_AUTH_I_H */
|
||||
|
Loading…
Reference in New Issue
Block a user