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:
Jouni Malinen 2015-06-23 22:38:38 +03:00
parent d93abd4a97
commit 8ec33326c1

View file

@ -488,9 +488,8 @@ static int sae_derive_commit(struct sae_data *sae)
crypto_bignum_mod(sae->tmp->own_commit_scalar, sae->tmp->order, crypto_bignum_mod(sae->tmp->own_commit_scalar, sae->tmp->order,
sae->tmp->own_commit_scalar); sae->tmp->own_commit_scalar);
if (sae->tmp->ec && sae_derive_commit_element_ecc(sae, mask) < 0) if ((sae->tmp->ec && sae_derive_commit_element_ecc(sae, mask) < 0) ||
goto fail; (sae->tmp->dh && sae_derive_commit_element_ffc(sae, mask) < 0))
if (sae->tmp->dh && sae_derive_commit_element_ffc(sae, mask) < 0)
goto fail; goto fail;
ret = 0; ret = 0;