commit fefa93e3bae05fafffad239bb01892c39f4c5852
parent 0925a362d6a26abea7b0517f97edda2f92f33ebe
Author: Denis Kenzior <denkenz@gmail.com>
Date: Sat, 10 Jul 2021 21:14:33 -0500
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.
Diffstat:
1 file changed, 0 insertions(+), 10 deletions(-)
diff --git a/src/sae.c b/src/sae.c
@@ -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;