handshake: add flag and setter to disallow rekeying

This commit is contained in:
James Prestwood 2019-01-25 11:23:09 -08:00 committed by Denis Kenzior
parent e4f22f0a5d
commit 2a7a756c9f
2 changed files with 7 additions and 0 deletions

View File

@ -258,6 +258,11 @@ void handshake_state_set_passphrase(struct handshake_state *s,
s->passphrase = l_strdup(passphrase);
}
void handshake_state_set_no_rekey(struct handshake_state *s, bool no_rekey)
{
s->no_rekey = no_rekey;
}
void handshake_state_new_snonce(struct handshake_state *s)
{
get_nonce(s->snonce);

View File

@ -106,6 +106,7 @@ struct handshake_state {
bool have_pmkid : 1;
bool authenticator : 1;
bool wait_for_gtk : 1;
bool no_rekey : 1;
uint8_t ssid[32];
size_t ssid_len;
char *passphrase;
@ -157,6 +158,7 @@ void handshake_state_set_event_func(struct handshake_state *s,
void *user_data);
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_new_snonce(struct handshake_state *s);
void handshake_state_new_anonce(struct handshake_state *s);