diff --git a/src/handshake.c b/src/handshake.c index d5787f5f..94389eda 100644 --- a/src/handshake.c +++ b/src/handshake.c @@ -117,6 +117,13 @@ void handshake_state_set_pmk(struct handshake_state *s, const uint8_t *pmk, s->have_pmk = true; } +void handshake_state_set_ptk(struct handshake_state *s, const uint8_t *ptk, + size_t ptk_len) +{ + memcpy(s->ptk, ptk, ptk_len); + s->ptk_complete = true; +} + void handshake_state_set_8021x_config(struct handshake_state *s, struct l_settings *settings) { diff --git a/src/handshake.h b/src/handshake.h index 2f97e0b2..c105b971 100644 --- a/src/handshake.h +++ b/src/handshake.h @@ -134,6 +134,8 @@ void handshake_state_set_authenticator_address(struct handshake_state *s, 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_ptk(struct handshake_state *s, const uint8_t *ptk, + size_t ptk_len); void handshake_state_set_8021x_config(struct handshake_state *s, struct l_settings *settings); bool handshake_state_set_supplicant_rsn(struct handshake_state *s,