mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 08:48:31 -05:00
SAE: Merge sae_derive_commit() error case return statements
These error cases have the exact same outcome, so a single return statement can be used. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
d93abd4a97
commit
8ec33326c1
@ -488,9 +488,8 @@ static int sae_derive_commit(struct sae_data *sae)
|
||||
crypto_bignum_mod(sae->tmp->own_commit_scalar, sae->tmp->order,
|
||||
sae->tmp->own_commit_scalar);
|
||||
|
||||
if (sae->tmp->ec && sae_derive_commit_element_ecc(sae, mask) < 0)
|
||||
goto fail;
|
||||
if (sae->tmp->dh && sae_derive_commit_element_ffc(sae, mask) < 0)
|
||||
if ((sae->tmp->ec && sae_derive_commit_element_ecc(sae, mask) < 0) ||
|
||||
(sae->tmp->dh && sae_derive_commit_element_ffc(sae, mask) < 0))
|
||||
goto fail;
|
||||
|
||||
ret = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user