mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 13:02:44 +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:
parent
1f512ff85c
commit
2036d36313
@ -98,6 +98,11 @@ void handshake_state_set_authenticator_address(struct handshake_state *s,
|
|||||||
memcpy(s->aa, aa, sizeof(s->aa));
|
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,
|
void handshake_state_set_pmk(struct handshake_state *s, const uint8_t *pmk,
|
||||||
size_t pmk_len)
|
size_t pmk_len)
|
||||||
{
|
{
|
||||||
|
@ -102,6 +102,7 @@ struct handshake_state {
|
|||||||
bool mfp : 1;
|
bool mfp : 1;
|
||||||
bool have_anonce : 1;
|
bool have_anonce : 1;
|
||||||
bool have_pmkid : 1;
|
bool have_pmkid : 1;
|
||||||
|
bool authenticator : 1;
|
||||||
uint8_t ssid[32];
|
uint8_t ssid[32];
|
||||||
size_t ssid_len;
|
size_t ssid_len;
|
||||||
char *passphrase;
|
char *passphrase;
|
||||||
@ -121,6 +122,7 @@ void handshake_state_set_supplicant_address(struct handshake_state *s,
|
|||||||
const uint8_t *spa);
|
const uint8_t *spa);
|
||||||
void handshake_state_set_authenticator_address(struct handshake_state *s,
|
void handshake_state_set_authenticator_address(struct handshake_state *s,
|
||||||
const uint8_t *aa);
|
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,
|
void handshake_state_set_pmk(struct handshake_state *s, const uint8_t *pmk,
|
||||||
size_t pmk_len);
|
size_t pmk_len);
|
||||||
void handshake_state_set_8021x_config(struct handshake_state *s,
|
void handshake_state_set_8021x_config(struct handshake_state *s,
|
||||||
|
Loading…
Reference in New Issue
Block a user