summaryrefslogtreecommitdiffstats
path: root/crypto/ec/ecp_nist.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2002-10-29 09:42:59 +0000
committerRichard Levitte <levitte@openssl.org>2002-10-29 09:42:59 +0000
commit62dd6f161a66f65d2c55544ac9a65c4986a74956 (patch)
treef1c904aecb54ecb1e426f25f279932fc39afdb61 /crypto/ec/ecp_nist.c
parent6aba658cd89700e06ccdd1beca668a9e1af30c74 (diff)
The #else part of the conditionals have two statements, so they need
to be surrounded with braces, or the surrounding if..else will fail miserably in case the #else part is compiled.
Diffstat (limited to 'crypto/ec/ecp_nist.c')
-rw-r--r--crypto/ec/ecp_nist.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/ec/ecp_nist.c b/crypto/ec/ecp_nist.c
index fb43510d52..98401fe4bc 100644
--- a/crypto/ec/ecp_nist.c
+++ b/crypto/ec/ecp_nist.c
@@ -154,26 +154,32 @@ int ec_GFp_nist_group_set_curve(EC_GROUP *group, const BIGNUM *p,
if (BN_ucmp(BN_get0_nist_prime_192(), p) == 0)
group->field_mod_func = BN_nist_mod_192;
else if (BN_ucmp(BN_get0_nist_prime_224(), p) == 0)
+ {
#if !defined(NO_32_BIT_TYPE) || defined(OPENSSL_NO_ASM)
group->field_mod_func = BN_nist_mod_224;
#else
ECerr(EC_F_EC_GFP_NIST_GROUP_SET_CURVE_GFP, EC_R_NOT_A_SUPPORTED_NIST_PRIME);
goto err;
#endif
+ }
else if (BN_ucmp(BN_get0_nist_prime_256(), p) == 0)
+ {
#if !defined(NO_32_BIT_TYPE) || defined(OPENSSL_NO_ASM)
group->field_mod_func = BN_nist_mod_256;
#else
ECerr(EC_F_EC_GFP_NIST_GROUP_SET_CURVE_GFP, EC_R_NOT_A_SUPPORTED_NIST_PRIME);
goto err;
#endif
+ }
else if (BN_ucmp(BN_get0_nist_prime_384(), p) == 0)
+ {
#if !defined(NO_32_BIT_TYPE) || defined(OPENSSL_NO_ASM)
group->field_mod_func = BN_nist_mod_384;
#else
ECerr(EC_F_EC_GFP_NIST_GROUP_SET_CURVE_GFP, EC_R_NOT_A_SUPPORTED_NIST_PRIME);
goto err;
#endif
+ }
else if (BN_ucmp(BN_get0_nist_prime_521(), p) == 0)
/* this one works in the NO_32_BIT_TYPE case */
group->field_mod_func = BN_nist_mod_521;