summaryrefslogtreecommitdiffstats
path: root/providers/implementations
diff options
context:
space:
mode:
authorTomas Mraz <tomas@openssl.org>2021-07-01 17:41:02 +0200
committerPauli <pauli@openssl.org>2021-07-06 10:52:27 +1000
commit3f773c911a03c5be2eff00beaf94e88f1d997b22 (patch)
treedbfe1a171b0a504548c992804cbc71a1661b5b6b /providers/implementations
parent1627a41f1db38c0e762cbbcb452a869924370561 (diff)
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 'providers/implementations')
-rw-r--r--providers/implementations/keymgmt/mac_legacy_kmgmt.c3
-rw-r--r--providers/implementations/macs/cmac_prov.c3
-rw-r--r--providers/implementations/macs/gmac_prov.c1
-rw-r--r--providers/implementations/macs/hmac_prov.c1
-rw-r--r--providers/implementations/signature/mac_legacy_sig.c3
5 files changed, 7 insertions, 4 deletions
diff --git a/providers/implementations/keymgmt/mac_legacy_kmgmt.c b/providers/implementations/keymgmt/mac_legacy_kmgmt.c
index e1e2609dfa..63553996bd 100644
--- a/providers/implementations/keymgmt/mac_legacy_kmgmt.c
+++ b/providers/implementations/keymgmt/mac_legacy_kmgmt.c
@@ -18,6 +18,9 @@
#include <openssl/evp.h>
#include <openssl/proverr.h>
#include <openssl/param_build.h>
+#ifndef FIPS_MODULE
+# include <openssl/engine.h>
+#endif
#include "internal/param_build_set.h"
#include "prov/implementations.h"
#include "prov/providercommon.h"
diff --git a/providers/implementations/macs/cmac_prov.c b/providers/implementations/macs/cmac_prov.c
index 2291276035..b44f13b5fa 100644
--- a/providers/implementations/macs/cmac_prov.c
+++ b/providers/implementations/macs/cmac_prov.c
@@ -16,7 +16,6 @@
#include <openssl/core_dispatch.h>
#include <openssl/core_names.h>
#include <openssl/params.h>
-#include <openssl/engine.h>
#include <openssl/evp.h>
#include <openssl/cmac.h>
@@ -111,7 +110,7 @@ static int cmac_setkey(struct cmac_data_st *macctx,
ossl_prov_cipher_cipher(&macctx->cipher),
ossl_prov_cipher_engine(&macctx->cipher));
ossl_prov_cipher_reset(&macctx->cipher);
- return rv;
+ return rv;
}
static int cmac_init(void *vmacctx, const unsigned char *key,
diff --git a/providers/implementations/macs/gmac_prov.c b/providers/implementations/macs/gmac_prov.c
index 29fb9f87df..89904fc89d 100644
--- a/providers/implementations/macs/gmac_prov.c
+++ b/providers/implementations/macs/gmac_prov.c
@@ -11,7 +11,6 @@
#include <openssl/core_dispatch.h>
#include <openssl/core_names.h>
#include <openssl/params.h>
-#include <openssl/engine.h>
#include <openssl/evp.h>
#include <openssl/err.h>
#include <openssl/proverr.h>
diff --git a/providers/implementations/macs/hmac_prov.c b/providers/implementations/macs/hmac_prov.c
index 3a0679ce8f..78c4924a38 100644
--- a/providers/implementations/macs/hmac_prov.c
+++ b/providers/implementations/macs/hmac_prov.c
@@ -18,7 +18,6 @@
#include <openssl/core_dispatch.h>
#include <openssl/core_names.h>
#include <openssl/params.h>
-#include <openssl/engine.h>
#include <openssl/evp.h>
#include <openssl/hmac.h>
diff --git a/providers/implementations/signature/mac_legacy_sig.c b/providers/implementations/signature/mac_legacy_sig.c
index d9fd105289..06f79505ff 100644
--- a/providers/implementations/signature/mac_legacy_sig.c
+++ b/providers/implementations/signature/mac_legacy_sig.c
@@ -16,6 +16,9 @@
#include <openssl/core_names.h>
#include <openssl/params.h>
#include <openssl/err.h>
+#ifndef FIPS_MODULE
+# include <openssl/engine.h>
+#endif
#include "prov/implementations.h"
#include "prov/provider_ctx.h"
#include "prov/macsignature.h"