commit ea152c9: fix compatibility with OpenSSL 3.0.0
Tomohiro Tomo-p KATO
tomop at teamgedoh.net
Sat Oct 16 13:28:04 UTC 2021
Author: Tomohiro "Tomo-p" KATO
Date: 2021-10-16 16:29:43 +0900
URL: https://github.com/rspamd/rspamd/commit/ea152c9d7e60d7554eeb7cde69faac39404d5345 (refs/pull/3941/head)
fix compatibility with OpenSSL 3.0.0
---
src/libserver/cfg_utils.c | 8 ++++++++
1 file changed, 8 insertions(+)
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;
}
More information about the Commits
mailing list