From 963657514d24c29604e0b873c17dcee0d3efd345 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 7 Feb 2020 13:18:32 +0000 Subject: [Minor] Add explicit checks for FIPS mode presence --- src/libutil/util.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/libutil/util.c') diff --git a/src/libutil/util.c b/src/libutil/util.c index 3256becb9..119082964 100644 --- a/src/libutil/util.c +++ b/src/libutil/util.c @@ -2484,6 +2484,7 @@ rspamd_config_libs (struct rspamd_external_libs_ctx *ctx, } if (cfg->fips_mode) { +#ifdef HAVE_FIPS_MODE int mode = FIPS_mode (); unsigned long err = (unsigned long)-1; @@ -2505,6 +2506,9 @@ rspamd_config_libs (struct rspamd_external_libs_ctx *ctx, else { msg_info_config ("OpenSSL FIPS mode is enabled"); } +#else + msg_warn_config ("SSL FIPS mode is enabled but not supported by OpenSSL library!"); +#endif } if (cfg->ssl_ca_path) { -- cgit v1.2.3