sae: Drop unneeded state checks

Now that sae_verify_* methods no longer allow dropped frames though,
there's no reason to keep these checks.  sae_process_commit and
sae_process_confirm will now always receive messages in their respective
state.
This commit is contained in:
Denis Kenzior 2021-07-10 21:14:33 -05:00
parent 0925a362d6
commit fefa93e3ba
1 changed files with 0 additions and 10 deletions

View File

@ -488,11 +488,6 @@ static int sae_process_commit(struct sae_sm *sm, const uint8_t *from,
struct l_ecc_scalar *order;
unsigned int nbytes = l_ecc_curve_get_scalar_bytes(sm->curve);
if (sm->state != SAE_STATE_COMMITTED) {
l_error("bad state %u", sm->state);
goto reject;
}
ptr += 2;
sm->p_scalar = l_ecc_scalar_new(sm->curve, ptr, nbytes);
@ -614,11 +609,6 @@ static int sae_process_confirm(struct sae_sm *sm, const uint8_t *from,
{
const uint8_t *ptr = frame;
if (sm->state != SAE_STATE_CONFIRMED) {
l_error("bad state %u", sm->state);
goto reject;
}
if (len < 34) {
l_error("bad length");
goto reject;