diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-10-16 14:22:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-16 14:22:00 +0100 |
commit | 4c5dcdb2006ad50b000843dd750d4fe784cb2874 (patch) | |
tree | a68960a254eb38447aad824d32a6774e244bcfc7 /src/libserver | |
parent | d46bfc3a075bb39fd5cd48b49fd43bbd3aa761f4 (diff) | |
parent | ea152c9d7e60d7554eeb7cde69faac39404d5345 (diff) | |
download | rspamd-4c5dcdb2006ad50b000843dd750d4fe784cb2874.tar.gz rspamd-4c5dcdb2006ad50b000843dd750d4fe784cb2874.zip |
Merge pull request #3941 from tomop-tg/openssl3
fix compatibility with OpenSSL 3.0.0
Diffstat (limited to 'src/libserver')
-rw-r--r-- | src/libserver/cfg_utils.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libserver/cfg_utils.c b/src/libserver/cfg_utils.c index 7a9f9cd53..5c2bd63d7 100644 --- a/src/libserver/cfg_utils.c +++ b/src/libserver/cfg_utils.c @@ -2756,7 +2756,11 @@ rspamd_config_libs (struct rspamd_external_libs_ctx *ctx, /* Toggle FIPS mode */ if (mode == 0) { +#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) + if (EVP_set_default_properties (NULL, "fips=yes") != 1) { +#else if (FIPS_mode_set (1) != 1) { +#endif err = ERR_get_error (); } } @@ -2765,7 +2769,11 @@ rspamd_config_libs (struct rspamd_external_libs_ctx *ctx, } if (err != (unsigned long)-1) { +#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) + msg_err_config ("EVP_set_default_properties failed: %s", +#else msg_err_config ("FIPS_mode_set failed: %s", +#endif ERR_error_string (err, NULL)); ret = FALSE; } |