aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/ec/ec_lib.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2020-04-13 22:34:56 +0200
committerRichard Levitte <levitte@openssl.org>2020-04-28 15:37:37 +0200
commitf844f9eb44186df2f8b0cfd3264b4eb003d8c61a (patch)
tree29860f9c269b67546a418c0197066164e455a362 /crypto/ec/ec_lib.c
parentcf86057a1acd13b13c9bd8f7b8a14bbc0e3ffd56 (diff)
downloadopenssl-f844f9eb44186df2f8b0cfd3264b4eb003d8c61a.tar.gz
Rename FIPS_MODE to FIPS_MODULE
This macro is used to determine if certain pieces of code should become part of the FIPS module or not. The old name was confusing. Fixes #11538 Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/11539)
Diffstat (limited to 'crypto/ec/ec_lib.c')
-rw-r--r--crypto/ec/ec_lib.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/crypto/ec/ec_lib.c b/crypto/ec/ec_lib.c
index 16fe437dde..589380d466 100644
--- a/crypto/ec/ec_lib.c
+++ b/crypto/ec/ec_lib.c
@@ -65,7 +65,7 @@ EC_GROUP *EC_GROUP_new_ex(OPENSSL_CTX *libctx, const EC_METHOD *meth)
return NULL;
}
-#ifndef FIPS_MODE
+#ifndef FIPS_MODULE
EC_GROUP *EC_GROUP_new(const EC_METHOD *meth)
{
return EC_GROUP_new_ex(NULL, meth);
@@ -597,7 +597,7 @@ int EC_GROUP_cmp(const EC_GROUP *a, const EC_GROUP *b, BN_CTX *ctx)
{
int r = 0;
BIGNUM *a1, *a2, *a3, *b1, *b2, *b3;
-#ifndef FIPS_MODE
+#ifndef FIPS_MODULE
BN_CTX *ctx_new = NULL;
#endif
@@ -612,7 +612,7 @@ int EC_GROUP_cmp(const EC_GROUP *a, const EC_GROUP *b, BN_CTX *ctx)
if (a->meth->flags & EC_FLAGS_CUSTOM_CURVE)
return 0;
-#ifndef FIPS_MODE
+#ifndef FIPS_MODULE
if (ctx == NULL)
ctx_new = ctx = BN_CTX_new();
#endif
@@ -628,7 +628,7 @@ int EC_GROUP_cmp(const EC_GROUP *a, const EC_GROUP *b, BN_CTX *ctx)
b3 = BN_CTX_get(ctx);
if (b3 == NULL) {
BN_CTX_end(ctx);
-#ifndef FIPS_MODE
+#ifndef FIPS_MODULE
BN_CTX_free(ctx_new);
#endif
return -1;
@@ -680,7 +680,7 @@ int EC_GROUP_cmp(const EC_GROUP *a, const EC_GROUP *b, BN_CTX *ctx)
}
end:
BN_CTX_end(ctx);
-#ifndef FIPS_MODE
+#ifndef FIPS_MODULE
BN_CTX_free(ctx_new);
#endif
return r;
@@ -1047,7 +1047,7 @@ int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
{
int ret = 0;
size_t i = 0;
-#ifndef FIPS_MODE
+#ifndef FIPS_MODULE
BN_CTX *new_ctx = NULL;
#endif
@@ -1066,7 +1066,7 @@ int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
}
}
-#ifndef FIPS_MODE
+#ifndef FIPS_MODULE
if (ctx == NULL)
ctx = new_ctx = BN_CTX_secure_new();
#endif
@@ -1081,7 +1081,7 @@ int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
/* use default */
ret = ec_wNAF_mul(group, r, scalar, num, points, scalars, ctx);
-#ifndef FIPS_MODE
+#ifndef FIPS_MODULE
BN_CTX_free(new_ctx);
#endif
return ret;
@@ -1161,7 +1161,7 @@ static int ec_precompute_mont_data(EC_GROUP *group)
return ret;
}
-#ifndef FIPS_MODE
+#ifndef FIPS_MODULE
int EC_KEY_set_ex_data(EC_KEY *key, int idx, void *arg)
{
return CRYPTO_set_ex_data(&key->ex_data, idx, arg);
@@ -1185,14 +1185,14 @@ static int ec_field_inverse_mod_ord(const EC_GROUP *group, BIGNUM *r,
{
BIGNUM *e = NULL;
int ret = 0;
-#ifndef FIPS_MODE
+#ifndef FIPS_MODULE
BN_CTX *new_ctx = NULL;
#endif
if (group->mont_data == NULL)
return 0;
-#ifndef FIPS_MODE
+#ifndef FIPS_MODULE
if (ctx == NULL)
ctx = new_ctx = BN_CTX_secure_new();
#endif
@@ -1222,7 +1222,7 @@ static int ec_field_inverse_mod_ord(const EC_GROUP *group, BIGNUM *r,
err:
BN_CTX_end(ctx);
-#ifndef FIPS_MODE
+#ifndef FIPS_MODULE
BN_CTX_free(new_ctx);
#endif
return ret;