diff options
author | Tomas Mraz <tomas@openssl.org> | 2021-07-01 17:41:02 +0200 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2021-07-06 10:52:27 +1000 |
commit | 3f773c911a03c5be2eff00beaf94e88f1d997b22 (patch) | |
tree | dbfe1a171b0a504548c992804cbc71a1661b5b6b /crypto/rsa | |
parent | 1627a41f1db38c0e762cbbcb452a869924370561 (diff) | |
download | openssl-new-3f773c911a03c5be2eff00beaf94e88f1d997b22.tar.gz |
fips module header inclusion fine-tunning
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15974)
Diffstat (limited to 'crypto/rsa')
-rw-r--r-- | crypto/rsa/rsa_backend.c | 5 | ||||
-rw-r--r-- | crypto/rsa/rsa_lib.c | 4 | ||||
-rw-r--r-- | crypto/rsa/rsa_sign.c | 32 |
3 files changed, 23 insertions, 18 deletions
diff --git a/crypto/rsa/rsa_backend.c b/crypto/rsa/rsa_backend.c index e824dcaf3c..85ad54e4cf 100644 --- a/crypto/rsa/rsa_backend.c +++ b/crypto/rsa/rsa_backend.c @@ -18,9 +18,12 @@ #include <openssl/params.h> #include <openssl/err.h> #include <openssl/evp.h> +#ifndef FIPS_MODULE +# include <openssl/x509.h> +# include "crypto/asn1.h" +#endif #include "internal/sizes.h" #include "internal/param_build_set.h" -#include "crypto/asn1.h" #include "crypto/rsa.h" #include "rsa_local.h" diff --git a/crypto/rsa/rsa_lib.c b/crypto/rsa/rsa_lib.c index 70eaa59a8b..6433282597 100644 --- a/crypto/rsa/rsa_lib.c +++ b/crypto/rsa/rsa_lib.c @@ -15,7 +15,9 @@ #include <openssl/crypto.h> #include <openssl/core_names.h> -#include <openssl/engine.h> +#ifndef FIPS_MODULE +# include <openssl/engine.h> +#endif #include <openssl/evp.h> #include <openssl/param_build.h> #include "internal/cryptlib.h" diff --git a/crypto/rsa/rsa_sign.c b/crypto/rsa/rsa_sign.c index 21a2e9d727..c5a664dc0b 100644 --- a/crypto/rsa/rsa_sign.c +++ b/crypto/rsa/rsa_sign.c @@ -18,22 +18,22 @@ #include <openssl/bn.h> #include <openssl/rsa.h> #include <openssl/objects.h> -#include <openssl/x509.h> -#include "crypto/x509.h" -#ifndef OPENSSL_NO_MD2 -# include <openssl/md2.h> /* uses MD2_DIGEST_LENGTH */ -#endif -#ifndef OPENSSL_NO_MD4 -# include <openssl/md4.h> /* uses MD4_DIGEST_LENGTH */ -#endif -#ifndef OPENSSL_NO_MD5 -# include <openssl/md5.h> /* uses MD5_DIGEST_LENGTH */ -#endif -#ifndef OPENSSL_NO_MDC2 -# include <openssl/mdc2.h> /* uses MDC2_DIGEST_LENGTH */ -#endif -#ifndef OPENSSL_NO_RMD160 -# include <openssl/ripemd.h> /* uses RIPEMD160_DIGEST_LENGTH */ +#ifndef FIPS_MODULE +# ifndef OPENSSL_NO_MD2 +# include <openssl/md2.h> /* uses MD2_DIGEST_LENGTH */ +# endif +# ifndef OPENSSL_NO_MD4 +# include <openssl/md4.h> /* uses MD4_DIGEST_LENGTH */ +# endif +# ifndef OPENSSL_NO_MD5 +# include <openssl/md5.h> /* uses MD5_DIGEST_LENGTH */ +# endif +# ifndef OPENSSL_NO_MDC2 +# include <openssl/mdc2.h> /* uses MDC2_DIGEST_LENGTH */ +# endif +# ifndef OPENSSL_NO_RMD160 +# include <openssl/ripemd.h> /* uses RIPEMD160_DIGEST_LENGTH */ +# endif #endif #include <openssl/sha.h> /* uses SHA???_DIGEST_LENGTH */ #include "crypto/rsa.h" |