diff options
author | Wan-Teh Chang <wtc@google.com> | 2013-03-27 13:44:21 -0700 |
---|---|---|
committer | Wan-Teh Chang <wtc@google.com> | 2013-03-27 13:44:21 -0700 |
commit | ee546064ff669c7c86cb1f42e2435d67549a09e4 (patch) | |
tree | e12e778dbf41a7981740fc3fef26ab5b2a7e98b1 | |
parent | 37ffceebadfe073d4a067359d317e54c52f3864b (diff) | |
download | nss-hg-ee546064ff669c7c86cb1f42e2435d67549a09e4.tar.gz |
Bug 841884: Only require NSS_ENABLE_ECC for ecp_256.c, ecp_384.c,
and ecp_521.c. r=agl. Note that ecp_384.c is still not being used
(bug 841901).
-rw-r--r-- | lib/freebl/ecl/ecl.c | 6 | ||||
-rw-r--r-- | lib/freebl/manifest.mn | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/freebl/ecl/ecl.c b/lib/freebl/ecl/ecl.c index 962e0ad1d..e7582667b 100644 --- a/lib/freebl/ecl/ecl.c +++ b/lib/freebl/ecl/ecl.c @@ -215,8 +215,8 @@ ecgroup_fromNameAndHex(const ECCurveName name, /* determine which optimizations (if any) to use */ if (params->field == ECField_GFp) { -#ifdef NSS_ECC_MORE_THAN_SUITE_B switch (name) { +#ifdef NSS_ECC_MORE_THAN_SUITE_B #ifdef ECL_USE_FP case ECCurve_SECG_PRIME_160R1: group = @@ -256,6 +256,7 @@ ecgroup_fromNameAndHex(const ECCurveName name, MP_CHECKOK(ec_group_set_gfp224(group, name)); #endif break; +#endif /* NSS_ECC_MORE_THAN_SUITE_B */ case ECCurve_SECG_PRIME_256R1: group = ECGroup_consGFp(&irr, &curvea, &curveb, &genx, &geny, @@ -272,13 +273,12 @@ ecgroup_fromNameAndHex(const ECCurveName name, break; default: /* use generic arithmetic */ -#endif group = ECGroup_consGFp_mont(&irr, &curvea, &curveb, &genx, &geny, &order, params->cofactor); if (group == NULL) { res = MP_UNDEF; goto CLEANUP; } -#ifdef NSS_ECC_MORE_THAN_SUITE_B } +#ifdef NSS_ECC_MORE_THAN_SUITE_B } else if (params->field == ECField_GF2m) { group = ECGroup_consGF2m(&irr, NULL, &curvea, &curveb, &genx, &geny, &order, params->cofactor); if (group == NULL) { res = MP_UNDEF; goto CLEANUP; } diff --git a/lib/freebl/manifest.mn b/lib/freebl/manifest.mn index 55b4aaade..7b3133b14 100644 --- a/lib/freebl/manifest.mn +++ b/lib/freebl/manifest.mn @@ -72,11 +72,11 @@ ECL_HDRS = ecl-exp.h ecl.h ec2.h ecp.h ecl-priv.h ifdef NSS_ENABLE_ECC ECL_SRCS = ecl.c ecl_curve.c ecl_mult.c ecl_gf.c \ ecp_aff.c ecp_jac.c ecp_mont.c \ - ec_naf.c ecp_jm.c + ec_naf.c ecp_jm.c ecp_256.c ecp_384.c ecp_521.c ifdef NSS_ECC_MORE_THAN_SUITE_B ECL_SRCS += ec2_aff.c ec2_mont.c ec2_proj.c \ ec2_163.c ec2_193.c ec2_233.c \ - ecp_192.c ecp_224.c ecp_256.c ecp_384.c ecp_521.c + ecp_192.c ecp_224.c endif else ECL_SRCS = $(NULL) |