mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-26 18:59:22 +01:00
handshake: Add support for RSNXE
Allow handshake_state to track Authenticator & Supplicant RSN Extension elements (RSNXE)s.
This commit is contained in:
parent
37bc48add4
commit
6470601a34
@ -101,6 +101,8 @@ void handshake_state_free(struct handshake_state *s)
|
|||||||
|
|
||||||
l_free(s->authenticator_ie);
|
l_free(s->authenticator_ie);
|
||||||
l_free(s->supplicant_ie);
|
l_free(s->supplicant_ie);
|
||||||
|
l_free(s->authenticator_rsnxe);
|
||||||
|
l_free(s->supplicant_rsnxe);
|
||||||
l_free(s->mde);
|
l_free(s->mde);
|
||||||
l_free(s->fte);
|
l_free(s->fte);
|
||||||
|
|
||||||
@ -261,6 +263,19 @@ static void replace_ie(uint8_t **old, const uint8_t *new)
|
|||||||
*old = l_memdup(new, new[1] + 2);
|
*old = l_memdup(new, new[1] + 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void handshake_state_set_authenticator_rsnxe(struct handshake_state *s,
|
||||||
|
const uint8_t *ie)
|
||||||
|
{
|
||||||
|
l_free(s->authenticator_rsnxe);
|
||||||
|
s->authenticator_rsnxe = ie ? l_memdup(ie, ie[1] + 2) : NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
void handshake_state_set_supplicant_rsnxe(struct handshake_state *s,
|
||||||
|
const uint8_t *ie)
|
||||||
|
{
|
||||||
|
replace_ie(&s->supplicant_rsnxe, ie);
|
||||||
|
}
|
||||||
|
|
||||||
void handshake_state_set_ssid(struct handshake_state *s, const uint8_t *ssid,
|
void handshake_state_set_ssid(struct handshake_state *s, const uint8_t *ssid,
|
||||||
size_t ssid_len)
|
size_t ssid_len)
|
||||||
{
|
{
|
||||||
|
@ -85,6 +85,8 @@ struct handshake_state {
|
|||||||
uint8_t aa[6];
|
uint8_t aa[6];
|
||||||
uint8_t *authenticator_ie;
|
uint8_t *authenticator_ie;
|
||||||
uint8_t *supplicant_ie;
|
uint8_t *supplicant_ie;
|
||||||
|
uint8_t *authenticator_rsnxe;
|
||||||
|
uint8_t *supplicant_rsnxe;
|
||||||
uint8_t *mde;
|
uint8_t *mde;
|
||||||
uint8_t *fte;
|
uint8_t *fte;
|
||||||
enum ie_rsn_cipher_suite pairwise_cipher;
|
enum ie_rsn_cipher_suite pairwise_cipher;
|
||||||
@ -164,6 +166,10 @@ bool handshake_state_set_authenticator_ie(struct handshake_state *s,
|
|||||||
const uint8_t *ie);
|
const uint8_t *ie);
|
||||||
bool handshake_state_set_supplicant_ie(struct handshake_state *s,
|
bool handshake_state_set_supplicant_ie(struct handshake_state *s,
|
||||||
const uint8_t *ie);
|
const uint8_t *ie);
|
||||||
|
void handshake_state_set_authenticator_rsnxe(struct handshake_state *s,
|
||||||
|
const uint8_t *ie);
|
||||||
|
void handshake_state_set_supplicant_rsnxe(struct handshake_state *s,
|
||||||
|
const uint8_t *ie);
|
||||||
void handshake_state_set_ssid(struct handshake_state *s,
|
void handshake_state_set_ssid(struct handshake_state *s,
|
||||||
const uint8_t *ssid, size_t ssid_len);
|
const uint8_t *ssid, size_t ssid_len);
|
||||||
void handshake_state_set_mde(struct handshake_state *s,
|
void handshake_state_set_mde(struct handshake_state *s,
|
||||||
|
Loading…
Reference in New Issue
Block a user