diff --git a/src/sae.c b/src/sae.c index 97c0af05..f2cebe09 100644 --- a/src/sae.c +++ b/src/sae.c @@ -857,6 +857,20 @@ static bool sae_verify_confirm(struct sae_sm *sm, const uint8_t *frame) return true; } +#include + +static void print_pmk(uint8_t *pmk) +{ + unsigned int i; + + printf("PMK: "); + + for (i = 0; i < 32; i++) + printf("%02x", pmk[i]); + + printf("\n"); +} + static int sae_process_confirm(struct sae_sm *sm, const uint8_t *from, const uint8_t *frame, size_t len) { @@ -880,6 +894,8 @@ static int sae_process_confirm(struct sae_sm *sm, const uint8_t *from, handshake_state_set_pmkid(sm->handshake, sm->pmkid); handshake_state_set_pmk(sm->handshake, sm->pmk, 32); + print_pmk(sm->pmk); + sm->state = SAE_STATE_ACCEPTED; if (!sm->handshake->authenticator) {