1 |
commit: 9ef604de7f80a1db7a66d4574623bc3127862125 |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jul 31 19:55:43 2021 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jul 31 19:55:43 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9ef604de |
7 |
|
8 |
net-misc/freerdp: fix build with openssl-3.0 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/805548 |
11 |
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> |
12 |
|
13 |
net-misc/freerdp/files/freerdp-2-openssl-3.0.patch | 38 ++++++++++++++++++++++ |
14 |
net-misc/freerdp/freerdp-2.3.2.ebuild | 4 +++ |
15 |
net-misc/freerdp/freerdp-2.9999.ebuild | 4 +++ |
16 |
3 files changed, 46 insertions(+) |
17 |
|
18 |
diff --git a/net-misc/freerdp/files/freerdp-2-openssl-3.0.patch b/net-misc/freerdp/files/freerdp-2-openssl-3.0.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..74b9d406130 |
21 |
--- /dev/null |
22 |
+++ b/net-misc/freerdp/files/freerdp-2-openssl-3.0.patch |
23 |
@@ -0,0 +1,38 @@ |
24 |
+From 26bf2816c3e0daeaf524c47cf0fcda8ae13b65ad Mon Sep 17 00:00:00 2001 |
25 |
+From: Ondrej Holy <oholy@××××××.com> |
26 |
+Date: Wed, 12 May 2021 12:48:15 +0200 |
27 |
+Subject: [PATCH] Fix FIPS mode support and build with OpenSSL 3.0 |
28 |
+ |
29 |
+FreeRDP fails to build with OpenSSL 3.0 because of usage of the `FIPS_mode` |
30 |
+and `FIPS_mode_set` functions, which were removed there. Just a note that |
31 |
+the FIPS mode is not supported by OpenSSL 1.1.* although the mentioned |
32 |
+functions are still there (see https://wiki.openssl.org/index.php/FIPS_modules). |
33 |
+Let's make FreeRDP build with OpenSSL 3.0 and fix the FIPS mode support. |
34 |
+ |
35 |
+See: https://bugzilla.redhat.com/show_bug.cgi?id=1952937 |
36 |
+--- |
37 |
+ winpr/libwinpr/utils/ssl.c | 8 ++++++++ |
38 |
+ 1 file changed, 8 insertions(+) |
39 |
+ |
40 |
+diff --git a/winpr/libwinpr/utils/ssl.c b/winpr/libwinpr/utils/ssl.c |
41 |
+index 3a859039034..03b23af43ac 100644 |
42 |
+--- a/winpr/libwinpr/utils/ssl.c |
43 |
++++ b/winpr/libwinpr/utils/ssl.c |
44 |
+@@ -244,9 +244,17 @@ static BOOL winpr_enable_fips(DWORD flags) |
45 |
+ #else |
46 |
+ WLog_DBG(TAG, "Ensuring openssl fips mode is ENabled"); |
47 |
+ |
48 |
++#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) |
49 |
++ if (!EVP_default_properties_is_fips_enabled(NULL)) |
50 |
++#else |
51 |
+ if (FIPS_mode() != 1) |
52 |
++#endif |
53 |
+ { |
54 |
++#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) |
55 |
++ if (EVP_set_default_properties(NULL, "fips=yes")) |
56 |
++#else |
57 |
+ if (FIPS_mode_set(1)) |
58 |
++#endif |
59 |
+ WLog_INFO(TAG, "Openssl fips mode ENabled!"); |
60 |
+ else |
61 |
+ { |
62 |
|
63 |
diff --git a/net-misc/freerdp/freerdp-2.3.2.ebuild b/net-misc/freerdp/freerdp-2.3.2.ebuild |
64 |
index 50350a7d1f9..c08a85f6d05 100644 |
65 |
--- a/net-misc/freerdp/freerdp-2.3.2.ebuild |
66 |
+++ b/net-misc/freerdp/freerdp-2.3.2.ebuild |
67 |
@@ -88,6 +88,10 @@ BDEPEND=" |
68 |
) ) |
69 |
" |
70 |
|
71 |
+PATCHES=( |
72 |
+ "${FILESDIR}/freerdp-2-openssl-3.0.patch" |
73 |
+) |
74 |
+ |
75 |
src_configure() { |
76 |
local mycmakeargs=( |
77 |
-DBUILD_TESTING=$(usex test ON OFF) |
78 |
|
79 |
diff --git a/net-misc/freerdp/freerdp-2.9999.ebuild b/net-misc/freerdp/freerdp-2.9999.ebuild |
80 |
index 50350a7d1f9..c08a85f6d05 100644 |
81 |
--- a/net-misc/freerdp/freerdp-2.9999.ebuild |
82 |
+++ b/net-misc/freerdp/freerdp-2.9999.ebuild |
83 |
@@ -88,6 +88,10 @@ BDEPEND=" |
84 |
) ) |
85 |
" |
86 |
|
87 |
+PATCHES=( |
88 |
+ "${FILESDIR}/freerdp-2-openssl-3.0.patch" |
89 |
+) |
90 |
+ |
91 |
src_configure() { |
92 |
local mycmakeargs=( |
93 |
-DBUILD_TESTING=$(usex test ON OFF) |