handshake: add key for FILS-FT in handshake_state

FILS derives its own FT key, for use as xxkey during fast transition.
This commit is contained in:
James Prestwood 2019-05-10 13:19:26 -07:00 committed by Denis Kenzior
parent e109e1b1cf
commit aafb3fa7ed
2 changed files with 14 additions and 0 deletions

View File

@ -270,6 +270,14 @@ void handshake_state_set_no_rekey(struct handshake_state *s, bool no_rekey)
s->no_rekey = no_rekey;
}
void handshake_state_set_fils_ft(struct handshake_state *s,
const uint8_t *fils_ft,
size_t fils_ft_len)
{
memcpy(s->fils_ft, fils_ft, fils_ft_len);
s->fils_ft_len = fils_ft_len;
}
void handshake_state_new_snonce(struct handshake_state *s)
{
get_nonce(s->snonce);

View File

@ -97,6 +97,8 @@ struct handshake_state {
uint8_t pmk_r1[32];
uint8_t pmk_r1_name[16];
uint8_t pmkid[16];
uint8_t fils_ft[48];
uint8_t fils_ft_len;
struct l_settings *settings_8021x;
bool have_snonce : 1;
bool ptk_complete : 1;
@ -164,6 +166,10 @@ void handshake_state_set_passphrase(struct handshake_state *s,
const char *passphrase);
void handshake_state_set_no_rekey(struct handshake_state *s, bool no_rekey);
void handshake_state_set_fils_ft(struct handshake_state *s,
const uint8_t *fils_ft,
size_t fils_ft_len);
void handshake_state_new_snonce(struct handshake_state *s);
void handshake_state_new_anonce(struct handshake_state *s);
void handshake_state_set_anonce(struct handshake_state *s,