3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-26 10:39:23 +01:00

handshake: Add utility to generate a new anonce

AP EAPoL state machine will need to generate the anonce, so as
with snonce, an API was added to do that.
This commit is contained in:
James Prestwood 2018-06-20 11:05:16 -07:00 committed by Denis Kenzior
parent b059a699ab
commit 2177b22caa
2 changed files with 9 additions and 0 deletions

View File

@ -238,6 +238,13 @@ void handshake_state_new_snonce(struct handshake_state *s)
s->have_snonce = true;
}
void handshake_state_new_anonce(struct handshake_state *s)
{
get_nonce(s->anonce);
s->have_anonce = true;
}
void handshake_state_set_anonce(struct handshake_state *s,
const uint8_t *anonce)
{

View File

@ -86,6 +86,7 @@ struct handshake_state {
bool wpa_ie : 1;
bool have_pmk : 1;
bool mfp : 1;
bool have_anonce : 1;
uint8_t ssid[32];
size_t ssid_len;
uint8_t r0khid[48];
@ -126,6 +127,7 @@ void handshake_state_set_kh_ids(struct handshake_state *s,
const uint8_t *r1khid);
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,
const uint8_t *anonce);