diff options
-rw-r--r-- | meta-oe/recipes-support/freerdp/freerdp/0001-Fix-FIPS-mode-support-and-build-with-OpenSSL-3.0.patch | 43 | ||||
-rw-r--r-- | meta-oe/recipes-support/freerdp/freerdp/0002-winpr-avoid-calling-FIPS_mode-with-OpenSSL-3.0.patch | 28 | ||||
-rw-r--r-- | meta-oe/recipes-support/freerdp/freerdp_2.4.1.bb (renamed from meta-oe/recipes-support/freerdp/freerdp_2.3.0.bb) | 4 |
3 files changed, 1 insertions, 74 deletions
diff --git a/meta-oe/recipes-support/freerdp/freerdp/0001-Fix-FIPS-mode-support-and-build-with-OpenSSL-3.0.patch b/meta-oe/recipes-support/freerdp/freerdp/0001-Fix-FIPS-mode-support-and-build-with-OpenSSL-3.0.patch deleted file mode 100644 index 04fe644d47..0000000000 --- a/meta-oe/recipes-support/freerdp/freerdp/0001-Fix-FIPS-mode-support-and-build-with-OpenSSL-3.0.patch +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | From f703b1184229796d504a2e833f72ace4cc605d15 Mon Sep 17 00:00:00 2001 | ||
2 | From: Ondrej Holy <oholy@redhat.com> | ||
3 | Date: Wed, 12 May 2021 12:48:15 +0200 | ||
4 | Subject: [PATCH 1/2] Fix FIPS mode support and build with OpenSSL 3.0 | ||
5 | |||
6 | FreeRDP fails to build with OpenSSL 3.0 because of usage of the `FIPS_mode` | ||
7 | and `FIPS_mode_set` functions, which were removed there. Just a note that | ||
8 | the FIPS mode is not supported by OpenSSL 1.1.* although the mentioned | ||
9 | functions are still there (see https://wiki.openssl.org/index.php/FIPS_modules). | ||
10 | Let's make FreeRDP build with OpenSSL 3.0 and fix the FIPS mode support. | ||
11 | |||
12 | See: https://bugzilla.redhat.com/show_bug.cgi?id=1952937 | ||
13 | Upstream-Status: Backport | ||
14 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
15 | --- | ||
16 | winpr/libwinpr/utils/ssl.c | 8 ++++++++ | ||
17 | 1 file changed, 8 insertions(+) | ||
18 | |||
19 | diff --git a/winpr/libwinpr/utils/ssl.c b/winpr/libwinpr/utils/ssl.c | ||
20 | index 3a8590390..03b23af43 100644 | ||
21 | --- a/winpr/libwinpr/utils/ssl.c | ||
22 | +++ b/winpr/libwinpr/utils/ssl.c | ||
23 | @@ -244,9 +244,17 @@ static BOOL winpr_enable_fips(DWORD flags) | ||
24 | #else | ||
25 | WLog_DBG(TAG, "Ensuring openssl fips mode is ENabled"); | ||
26 | |||
27 | +#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) | ||
28 | + if (!EVP_default_properties_is_fips_enabled(NULL)) | ||
29 | +#else | ||
30 | if (FIPS_mode() != 1) | ||
31 | +#endif | ||
32 | { | ||
33 | +#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) | ||
34 | + if (EVP_set_default_properties(NULL, "fips=yes")) | ||
35 | +#else | ||
36 | if (FIPS_mode_set(1)) | ||
37 | +#endif | ||
38 | WLog_INFO(TAG, "Openssl fips mode ENabled!"); | ||
39 | else | ||
40 | { | ||
41 | -- | ||
42 | 2.20.1 | ||
43 | |||
diff --git a/meta-oe/recipes-support/freerdp/freerdp/0002-winpr-avoid-calling-FIPS_mode-with-OpenSSL-3.0.patch b/meta-oe/recipes-support/freerdp/freerdp/0002-winpr-avoid-calling-FIPS_mode-with-OpenSSL-3.0.patch deleted file mode 100644 index 728638e15d..0000000000 --- a/meta-oe/recipes-support/freerdp/freerdp/0002-winpr-avoid-calling-FIPS_mode-with-OpenSSL-3.0.patch +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | From 4dbf108c0ae5e997d5c432f3da4b4c5fd7b35373 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mike Gilbert <floppym@gentoo.org> | ||
3 | Date: Sun, 1 Aug 2021 12:14:43 -0400 | ||
4 | Subject: [PATCH 2/2] winpr: avoid calling FIPS_mode() with OpenSSL 3.0 | ||
5 | |||
6 | Fixes: 26bf2816c3e0daeaf524c47cf0fcda8ae13b65ad | ||
7 | Upstream-Status: Backport | ||
8 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
9 | --- | ||
10 | winpr/libwinpr/utils/ssl.c | 2 ++ | ||
11 | 1 file changed, 2 insertions(+) | ||
12 | |||
13 | diff --git a/winpr/libwinpr/utils/ssl.c b/winpr/libwinpr/utils/ssl.c | ||
14 | index 03b23af43..74ef156e7 100644 | ||
15 | --- a/winpr/libwinpr/utils/ssl.c | ||
16 | +++ b/winpr/libwinpr/utils/ssl.c | ||
17 | @@ -364,6 +364,8 @@ BOOL winpr_FIPSMode(void) | ||
18 | { | ||
19 | #if (OPENSSL_VERSION_NUMBER < 0x10001000L) || defined(LIBRESSL_VERSION_NUMBER) | ||
20 | return FALSE; | ||
21 | +#elif defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) | ||
22 | + return (EVP_default_properties_is_fips_enabled(NULL) == 1); | ||
23 | #else | ||
24 | return (FIPS_mode() == 1); | ||
25 | #endif | ||
26 | -- | ||
27 | 2.20.1 | ||
28 | |||
diff --git a/meta-oe/recipes-support/freerdp/freerdp_2.3.0.bb b/meta-oe/recipes-support/freerdp/freerdp_2.4.1.bb index 6f9dc780b7..6582b2e7d4 100644 --- a/meta-oe/recipes-support/freerdp/freerdp_2.3.0.bb +++ b/meta-oe/recipes-support/freerdp/freerdp_2.4.1.bb | |||
@@ -13,11 +13,9 @@ inherit pkgconfig cmake gitpkgv | |||
13 | PE = "1" | 13 | PE = "1" |
14 | PKGV = "${GITPKGVTAG}" | 14 | PKGV = "${GITPKGVTAG}" |
15 | 15 | ||
16 | SRCREV = "14c7f7aed7dd4e2454ee0cd81028b9f790885021" | 16 | SRCREV = "d39a7ba5c38e3ba3b99b1558dc2ab0970cbfb0c5" |
17 | SRC_URI = "git://github.com/FreeRDP/FreeRDP.git;branch=stable-2.0;protocol=https \ | 17 | SRC_URI = "git://github.com/FreeRDP/FreeRDP.git;branch=stable-2.0;protocol=https \ |
18 | file://winpr-makecert-Build-with-install-RPATH.patch \ | 18 | file://winpr-makecert-Build-with-install-RPATH.patch \ |
19 | file://0001-Fix-FIPS-mode-support-and-build-with-OpenSSL-3.0.patch \ | ||
20 | file://0002-winpr-avoid-calling-FIPS_mode-with-OpenSSL-3.0.patch \ | ||
21 | " | 19 | " |
22 | 20 | ||
23 | S = "${WORKDIR}/git" | 21 | S = "${WORKDIR}/git" |