From d89aab08bf4134da97214a63f20ed5cb2e5e4fa6 Mon Sep 17 00:00:00 2001 From: Vitaly Zaitsev Date: Thu, 9 Dec 2021 12:41:17 +0100 Subject: [PATCH] Fixed build against OpenSSL 3.0. Deprecated function FIPS_mode_set() was removed in OpenSSL 3.0. Switched to EVP_default_properties_enable_fips() as described in OpenSSL 3.0 migration guide. Signed-off-by: Vitaly Zaitsev --- Telegram/SourceFiles/core/utils.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Telegram/SourceFiles/core/utils.cpp b/Telegram/SourceFiles/core/utils.cpp index 241b12360..00d07d25b 100644 --- a/Telegram/SourceFiles/core/utils.cpp +++ b/Telegram/SourceFiles/core/utils.cpp @@ -86,7 +86,11 @@ namespace ThirdParty { } void finish() { +#if OPENSSL_VERSION_NUMBER >= 0x30000000L + EVP_default_properties_enable_fips(nullptr, 0); +#else FIPS_mode_set(0); +#endif CONF_modules_unload(1); Platform::ThirdParty::finish();