diff options
author | Matt Caswell <matt@openssl.org> | 2019-08-28 16:18:05 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2019-08-29 15:21:13 +0100 |
commit | 3be06e0d10e29dc4a00c6cb9dd06067b2c075f35 (patch) | |
tree | 68bb9ad90556ca653ecef1231ddf95fef2b0fb66 /providers | |
parent | bad41b689fd67fa44efbe6488c1c0b9d6e14c139 (diff) |
Fix no-engine
Make sure references to ENGINE functions are appropriately guarded.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9720)
Diffstat (limited to 'providers')
-rw-r--r-- | providers/common/macs/cmac_prov.c | 3 | ||||
-rw-r--r-- | providers/common/macs/gmac_prov.c | 3 | ||||
-rw-r--r-- | providers/common/macs/hmac_prov.c | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/providers/common/macs/cmac_prov.c b/providers/common/macs/cmac_prov.c index f63f405abf..4dcdea6ebe 100644 --- a/providers/common/macs/cmac_prov.c +++ b/providers/common/macs/cmac_prov.c @@ -184,7 +184,8 @@ static int cmac_set_ctx_params(void *vmacctx, const OSSL_PARAM params[]) const char *algoname = p->data; const char *propquery = NULL; -#ifndef FIPS_MODE /* Inside the FIPS module, we don't support engines */ +/* Inside the FIPS module, we don't support engines */ +#if !defined(FIPS_MODE) && !defined(OPENSSL_NO_ENGINE) ENGINE_finish(macctx->tmpengine); macctx->tmpengine = NULL; diff --git a/providers/common/macs/gmac_prov.c b/providers/common/macs/gmac_prov.c index ae0e9daba9..abd5baa106 100644 --- a/providers/common/macs/gmac_prov.c +++ b/providers/common/macs/gmac_prov.c @@ -198,7 +198,8 @@ static int gmac_set_ctx_params(void *vmacctx, const OSSL_PARAM params[]) const char *algoname = p->data; const char *propquery = NULL; -#ifndef FIPS_MODE /* Inside the FIPS module, we don't support engines */ +/* Inside the FIPS module, we don't support engines */ +#if !defined(FIPS_MODE) && !defined(OPENSSL_NO_ENGINE) ENGINE_finish(macctx->engine); macctx->engine = NULL; diff --git a/providers/common/macs/hmac_prov.c b/providers/common/macs/hmac_prov.c index e77dfe3439..e9be9802e6 100644 --- a/providers/common/macs/hmac_prov.c +++ b/providers/common/macs/hmac_prov.c @@ -198,7 +198,8 @@ static int hmac_set_ctx_params(void *vmacctx, const OSSL_PARAM params[]) const char *algoname = p->data; const char *propquery = NULL; -#ifndef FIPS_MODE /* Inside the FIPS module, we don't support engines */ +/* Inside the FIPS module, we don't support engines */ +#if !defined(FIPS_MODE) && !defined(OPENSSL_NO_ENGINE) ENGINE_finish(macctx->tmpengine); macctx->tmpengine = NULL; |