Skip to content

Commit

Permalink
net-misc/freerdp: fix build with libressl
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/672094
Package-Manager: Portage-2.3.51_p14, Repoman-2.3.12_p5
Signed-off-by: Mike Gilbert <[email protected]>
  • Loading branch information
floppym committed Dec 4, 2018
1 parent 153e524 commit f71c4d0
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
47 changes: 47 additions & 0 deletions net-misc/freerdp/files/2.0.0-rc4-libressl.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
From 649f49fa61ca98a05b26c3b2a26a1c30ca24ea26 Mon Sep 17 00:00:00 2001
From: Armin Novak <[email protected]>
Date: Thu, 22 Nov 2018 09:23:46 +0100
Subject: [PATCH] Fix #5049: LibreSSL does not have SSL_CTX_set_security_level

---
libfreerdp/crypto/tls.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libfreerdp/crypto/tls.c b/libfreerdp/crypto/tls.c
index 20fde415d8..76f51701fe 100644
--- a/libfreerdp/crypto/tls.c
+++ b/libfreerdp/crypto/tls.c
@@ -656,7 +656,7 @@ static BOOL tls_prepare(rdpTls* tls, BIO* underlying, SSL_METHOD* method,
#endif


-#if OPENSSL_VERSION_NUMBER >= 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
SSL_CTX_set_security_level(tls->ctx, settings->TlsSecLevel);
#endif

From effa8b8562d5e4b017570815c7e4d8faa0dd9a9e Mon Sep 17 00:00:00 2001
From: akallabeth <[email protected]>
Date: Thu, 22 Nov 2018 19:10:05 +0100
Subject: [PATCH] Fix #5049: Libressl declares OPENSSL_VERSION_NUMBER too high

Need to check specifically for LIBRESSL_VERSION_NUMBER as they
set the version higher than OpenSSL 1.1 but without API support.
---
libfreerdp/crypto/tls.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libfreerdp/crypto/tls.c b/libfreerdp/crypto/tls.c
index 76f51701fe..ded41f127e 100644
--- a/libfreerdp/crypto/tls.c
+++ b/libfreerdp/crypto/tls.c
@@ -655,8 +655,7 @@ static BOOL tls_prepare(rdpTls* tls, BIO* underlying, SSL_METHOD* method,
SSL_CTX_set_max_proto_version(tls->ctx, 0); /* highest supported version by library */
#endif

-
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
SSL_CTX_set_security_level(tls->ctx, settings->TlsSecLevel);
#endif

4 changes: 4 additions & 0 deletions net-misc/freerdp/freerdp-2.0.0_rc4.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ DEPEND="${RDEPEND}
) ) )
"

PATCHES=(
"${FILESDIR}"/2.0.0-rc4-libressl.patch
)

src_configure() {
local mycmakeargs=(
-DBUILD_TESTING=$(usex test)
Expand Down

0 comments on commit f71c4d0

Please sign in to comment.