diff --git a/Fix-FIPS-mode-support-and-build-with-OpenSSL-3.0.patch b/Fix-FIPS-mode-support-and-build-with-OpenSSL-3.0.patch new file mode 100644 index 0000000..20bf09a --- /dev/null +++ b/Fix-FIPS-mode-support-and-build-with-OpenSSL-3.0.patch @@ -0,0 +1,41 @@ +From df5d2572497f4cd7ab15144dbab99d0e01495127 Mon Sep 17 00:00:00 2001 +From: Ondrej Holy +Date: Wed, 12 May 2021 12:48:15 +0200 +Subject: [PATCH] Fix FIPS mode support and build with OpenSSL 3.0 + +FreeRDP fails to build with OpenSSL 3.0 because of usage of the `FIPS_mode` +and `FIPS_mode_set` functions, which were removed there. Just a note that +the FIPS mode is not supported by OpenSSL 1.1.* although the mentioned +functions are still there (see https://wiki.openssl.org/index.php/FIPS_modules). +Let's make FreeRDP build with OpenSSL 3.0 and fix the FIPS mode support. + +See: https://bugzilla.redhat.com/show_bug.cgi?id=1952937 +--- + winpr/libwinpr/utils/ssl.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/winpr/libwinpr/utils/ssl.c b/winpr/libwinpr/utils/ssl.c +index 3a8590390..03b23af43 100644 +--- a/winpr/libwinpr/utils/ssl.c ++++ b/winpr/libwinpr/utils/ssl.c +@@ -244,9 +244,17 @@ static BOOL winpr_enable_fips(DWORD flags) + #else + WLog_DBG(TAG, "Ensuring openssl fips mode is ENabled"); + ++#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) ++ if (!EVP_default_properties_is_fips_enabled(NULL)) ++#else + if (FIPS_mode() != 1) ++#endif + { ++#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) ++ if (EVP_set_default_properties(NULL, "fips=yes")) ++#else + if (FIPS_mode_set(1)) ++#endif + WLog_INFO(TAG, "Openssl fips mode ENabled!"); + else + { +-- +2.31.1 + diff --git a/freerdp.spec b/freerdp.spec index fc6c39e..d39c31e 100644 --- a/freerdp.spec +++ b/freerdp.spec @@ -22,7 +22,7 @@ Name: freerdp Version: 2.2.0 -Release: 7%{?dist} +Release: 8%{?dist} Epoch: 2 Summary: Free implementation of the Remote Desktop Protocol (RDP) License: ASL 2.0 @@ -30,6 +30,8 @@ URL: http://www.freerdp.com/ Source0: https://github.com/FreeRDP/FreeRDP/archive/%{version}/FreeRDP-%{version}.tar.gz +Patch0: Fix-FIPS-mode-support-and-build-with-OpenSSL-3.0.patch + BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: alsa-lib-devel @@ -296,6 +298,9 @@ find %{buildroot} -name "*.a" -delete %{_libdir}/pkgconfig/winpr-tools2.pc %changelog +* Mon May 17 2021 Ondrej Holy - 2:2.2.0-8 +- Fix build with OpenSSL 3.0 (#1952937). + * Thu Apr 15 2021 Mohan Boddu - 2:2.2.0-7 - Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937