aboutsummaryrefslogtreecommitdiff
path: root/crypto/bn/bn_prime.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/bn/bn_prime.c
parentcf86057a1acd13b13c9bd8f7b8a14bbc0e3ffd56 (diff)
downloadopenssl-f844f9eb44186df2f8b0cfd3264b4eb003d8c61a.zip
openssl-f844f9eb44186df2f8b0cfd3264b4eb003d8c61a.tar.gz
openssl-f844f9eb44186df2f8b0cfd3264b4eb003d8c61a.tar.bz2
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/bn/bn_prime.c')
-rw-r--r--crypto/bn/bn_prime.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/bn/bn_prime.c b/crypto/bn/bn_prime.c
index ce5789e..20fa0ba 100644
--- a/crypto/bn/bn_prime.c
+++ b/crypto/bn/bn_prime.c
@@ -207,7 +207,7 @@ int BN_generate_prime_ex2(BIGNUM *ret, int bits, int safe,
return found;
}
-#ifndef FIPS_MODE
+#ifndef FIPS_MODULE
int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe,
const BIGNUM *add, const BIGNUM *rem, BN_GENCB *cb)
{
@@ -265,7 +265,7 @@ static int bn_is_prime_int(const BIGNUM *w, int checks, BN_CTX *ctx,
int do_trial_division, BN_GENCB *cb)
{
int i, status, ret = -1;
-#ifndef FIPS_MODE
+#ifndef FIPS_MODULE
BN_CTX *ctxlocal = NULL;
#else
@@ -301,7 +301,7 @@ static int bn_is_prime_int(const BIGNUM *w, int checks, BN_CTX *ctx,
if (!BN_GENCB_call(cb, 1, -1))
return -1;
}
-#ifndef FIPS_MODE
+#ifndef FIPS_MODULE
if (ctx == NULL && (ctxlocal = ctx = BN_CTX_new()) == NULL)
goto err;
#endif
@@ -311,7 +311,7 @@ static int bn_is_prime_int(const BIGNUM *w, int checks, BN_CTX *ctx,
goto err;
ret = (status == BN_PRIMETEST_PROBABLY_PRIME);
err:
-#ifndef FIPS_MODE
+#ifndef FIPS_MODULE
BN_CTX_free(ctxlocal);
#endif
return ret;