diff --git a/src/handshake.c b/src/handshake.c index 8317d96a..7d51b55d 100644 --- a/src/handshake.c +++ b/src/handshake.c @@ -101,6 +101,8 @@ void handshake_state_free(struct handshake_state *s) l_free(s->authenticator_ie); l_free(s->supplicant_ie); + l_free(s->authenticator_rsnxe); + l_free(s->supplicant_rsnxe); l_free(s->mde); 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); } +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, size_t ssid_len) { diff --git a/src/handshake.h b/src/handshake.h index a004ca83..798e4258 100644 --- a/src/handshake.h +++ b/src/handshake.h @@ -85,6 +85,8 @@ struct handshake_state { uint8_t aa[6]; uint8_t *authenticator_ie; uint8_t *supplicant_ie; + uint8_t *authenticator_rsnxe; + uint8_t *supplicant_rsnxe; uint8_t *mde; uint8_t *fte; 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); bool handshake_state_set_supplicant_ie(struct handshake_state *s, 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, const uint8_t *ssid, size_t ssid_len); void handshake_state_set_mde(struct handshake_state *s,