sae: Don't destroy token on group change

There's no reason why a change in groups would result in the
anti-clogging token becoming invalid.  This might result in us needing
an extra round-trip if the peer is using countermeasures and our
requested group was deemed unsuitable.
This commit is contained in:
Denis Kenzior 2021-07-09 23:32:19 -05:00
parent c02b1466c4
commit a46269d5b0
1 changed files with 3 additions and 3 deletions

View File

@ -120,9 +120,6 @@ static void sae_rejected_groups_append(struct sae_sm *sm, uint16_t group)
static void sae_reset_state(struct sae_sm *sm)
{
l_free(sm->token);
sm->token = NULL;
l_ecc_scalar_free(sm->scalar);
sm->scalar = NULL;
l_ecc_scalar_free(sm->p_scalar);
@ -1314,6 +1311,9 @@ static void sae_free(struct auth_proto *ap)
sae_reset_state(sm);
l_free(sm->token);
sm->token = NULL;
if (sm->rejected_groups)
free(sm->rejected_groups);