diff options
author | Richard Levitte <levitte@openssl.org> | 2020-04-13 22:34:56 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2020-04-28 15:37:37 +0200 |
commit | f844f9eb44186df2f8b0cfd3264b4eb003d8c61a (patch) | |
tree | 29860f9c269b67546a418c0197066164e455a362 /crypto/evp/pmeth_gn.c | |
parent | cf86057a1acd13b13c9bd8f7b8a14bbc0e3ffd56 (diff) |
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/evp/pmeth_gn.c')
-rw-r--r-- | crypto/evp/pmeth_gn.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/crypto/evp/pmeth_gn.c b/crypto/evp/pmeth_gn.c index 0d6a82200f..dbc6c914e7 100644 --- a/crypto/evp/pmeth_gn.c +++ b/crypto/evp/pmeth_gn.c @@ -20,7 +20,7 @@ #include "crypto/evp.h" #include "evp_local.h" -#if !defined(FIPS_MODE) && !defined(OPENSSL_NO_EC) +#if !defined(FIPS_MODULE) && !defined(OPENSSL_NO_EC) # define TMP_SM2_HACK #endif @@ -69,7 +69,7 @@ static int gen_init(EVP_PKEY_CTX *ctx, int operation) goto end; legacy: -#ifdef FIPS_MODE +#ifdef FIPS_MODULE goto not_supported; #else if (ctx->pmeth == NULL @@ -189,7 +189,7 @@ int EVP_PKEY_gen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey) ossl_callback_to_pkey_gencb, ctx) != NULL); -#ifndef FIPS_MODE +#ifndef FIPS_MODULE /* In case |*ppkey| was originally a legacy key */ if (ret) evp_pkey_free_legacy(*ppkey); @@ -223,7 +223,7 @@ int EVP_PKEY_gen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey) goto end; legacy: -#ifdef FIPS_MODE +#ifdef FIPS_MODULE goto not_supported; #else if (ctx->pkey && !evp_pkey_downgrade(ctx->pkey)) @@ -256,7 +256,7 @@ int EVP_PKEY_gen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey) ERR_raise(ERR_LIB_EVP, EVP_R_OPERATON_NOT_INITIALIZED); ret = -1; goto end; -#ifndef FIPS_MODE +#ifndef FIPS_MODULE not_accessible: ERR_raise(ERR_LIB_EVP, EVP_R_INACCESSIBLE_DOMAIN_PARAMETERS); ret = -1; @@ -319,7 +319,7 @@ int EVP_PKEY_CTX_get_keygen_info(EVP_PKEY_CTX *ctx, int idx) return ctx->keygen_info[idx]; } -#ifndef FIPS_MODE +#ifndef FIPS_MODULE EVP_PKEY *EVP_PKEY_new_mac_key(int type, ENGINE *e, const unsigned char *key, int keylen) @@ -340,9 +340,9 @@ EVP_PKEY *EVP_PKEY_new_mac_key(int type, ENGINE *e, return mac_key; } -#endif /* FIPS_MODE */ +#endif /* FIPS_MODULE */ -/*- All methods below can also be used in FIPS_MODE */ +/*- All methods below can also be used in FIPS_MODULE */ static int fromdata_init(EVP_PKEY_CTX *ctx, int operation) { |