3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-21 20:12:37 +01:00

handshake: introduce authenticator bit

Both SAE and adhoc can benefit from knowing whether the handshake state
is an authenticator or a supplicant. It will allow both to easily
obtain the remote address rather than sorting out if aa/spa match the
devices own address.
This commit is contained in:
James Prestwood 2018-08-15 10:36:18 -07:00 committed by Denis Kenzior
parent 1f512ff85c
commit 2036d36313
2 changed files with 7 additions and 0 deletions

View File

@ -98,6 +98,11 @@ void handshake_state_set_authenticator_address(struct handshake_state *s,
memcpy(s->aa, aa, sizeof(s->aa));
}
void handshake_state_set_authenticator(struct handshake_state *s, bool auth)
{
s->authenticator = auth;
}
void handshake_state_set_pmk(struct handshake_state *s, const uint8_t *pmk,
size_t pmk_len)
{

View File

@ -102,6 +102,7 @@ struct handshake_state {
bool mfp : 1;
bool have_anonce : 1;
bool have_pmkid : 1;
bool authenticator : 1;
uint8_t ssid[32];
size_t ssid_len;
char *passphrase;
@ -121,6 +122,7 @@ void handshake_state_set_supplicant_address(struct handshake_state *s,
const uint8_t *spa);
void handshake_state_set_authenticator_address(struct handshake_state *s,
const uint8_t *aa);
void handshake_state_set_authenticator(struct handshake_state *s, bool auth);
void handshake_state_set_pmk(struct handshake_state *s, const uint8_t *pmk,
size_t pmk_len);
void handshake_state_set_8021x_config(struct handshake_state *s,