From fefa93e3bae05fafffad239bb01892c39f4c5852 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Sat, 10 Jul 2021 21:14:33 -0500 Subject: [PATCH] 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. --- src/sae.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/sae.c b/src/sae.c index 07f1542c..d7ed97b1 100644 --- 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;