diff options
author | Rich Salz <rsalz@akamai.com> | 2020-03-05 12:50:31 -0500 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2020-04-16 13:52:22 +0200 |
commit | 705536e2b5c4167dbda2e0046d83f9e0f4a65514 (patch) | |
tree | 5b76e00908f3d8c5dcbb75f094a4c06d989e97d5 /crypto/ec/ecp_nistputil.c | |
parent | 7165593ce5a07a6860d4d408ad640ee707172936 (diff) |
Use build.info, not ifdef for crypto modules
Don't wrap conditionally-compiled files in global ifndef tests.
Instead, test if the feature is disabled and, if so, do not
compile it.
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11263)
Diffstat (limited to 'crypto/ec/ecp_nistputil.c')
-rw-r--r-- | crypto/ec/ecp_nistputil.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/crypto/ec/ecp_nistputil.c b/crypto/ec/ecp_nistputil.c index d3739a108c..52ce6ee879 100644 --- a/crypto/ec/ecp_nistputil.c +++ b/crypto/ec/ecp_nistputil.c @@ -30,16 +30,13 @@ #include "internal/deprecated.h" #include <openssl/opensslconf.h> -#ifdef OPENSSL_NO_EC_NISTP_64_GCC_128 -NON_EMPTY_TRANSLATION_UNIT -#else /* * Common utility functions for ecp_nistp224.c, ecp_nistp256.c, ecp_nistp521.c. */ -# include <stddef.h> -# include "ec_local.h" +#include <stddef.h> +#include "ec_local.h" /* * Convert an array of points into affine coordinates. (If the point at @@ -80,10 +77,10 @@ void ec_GFp_nistp_points_make_affine_internal(size_t num, void *point_array, { int i = 0; -# define tmp_felem(I) (&((char *)tmp_felems)[(I) * felem_size]) -# define X(I) (&((char *)point_array)[3*(I) * felem_size]) -# define Y(I) (&((char *)point_array)[(3*(I) + 1) * felem_size]) -# define Z(I) (&((char *)point_array)[(3*(I) + 2) * felem_size]) +#define tmp_felem(I) (&((char *)tmp_felems)[(I) * felem_size]) +#define X(I) (&((char *)point_array)[3*(I) * felem_size]) +#define Y(I) (&((char *)point_array)[(3*(I) + 1) * felem_size]) +#define Z(I) (&((char *)point_array)[(3*(I) + 2) * felem_size]) if (!felem_is_zero(Z(0))) felem_assign(tmp_felem(0), Z(0)); @@ -226,4 +223,3 @@ void ec_GFp_nistp_recode_scalar_bits(unsigned char *sign, *sign = s & 1; *digit = d; } -#endif |