Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0.0-rc4 doesn't build with libressl #5049

Closed
kapsh opened this issue Nov 21, 2018 · 3 comments
Closed

2.0.0-rc4 doesn't build with libressl #5049

kapsh opened this issue Nov 21, 2018 · 3 comments

Comments

@kapsh
Copy link

kapsh commented Nov 21, 2018

Describe the bug
FreeRDP 2.0.0-rc4 and master cannot be built against libressl (2.7.4 if it matters):

[100%] Linking C executable xfreerdp
/usr/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ld: ../../libfreerdp/libfreerdp2.so.2.0.0: undefined reference to `SSL_CTX_set_security_level'
collect2: error: ld returned 1 exit status

To Reproduce
Steps to reproduce the behavior:

  1. mkdir build && cd build
  2. cmake .. && make

Expected behavior
It worked in previous 2.0.0-rc3.

Screenshots
If applicable, add screenshots to help explain your problem.

** Application details

  • Version of FreeRDP
  • Command line used
  • output of /buildconfig
  • OS version connecting to
  • If available the log output from a run with /log-level:trace

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
libressl_build.log

@kapsh kapsh changed the title Doesn't build with libressl 2.0.0-rc4 doesn't build with libressl Nov 21, 2018
@akallabeth akallabeth added this to the 2.0.0 milestone Nov 21, 2018
mfleisz added a commit that referenced this issue Nov 22, 2018
Fix #5049: LibreSSL does not have SSL_CTX_set_security_level
@kapsh
Copy link
Author

kapsh commented Nov 22, 2018

Sorry, this didn't work. Looks like libressl has #define OPENSSL_VERSION_NUMBER 0x20000000L (very annoying of them) and proper fix could look like:

diff --git a/libfreerdp/crypto/tls.c b/libfreerdp/crypto/tls.c
index 20fde415d..76f51701f 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 && !defined(LIBRESSL_VERSION_NUMBER)
 	SSL_CTX_set_security_level(tls->ctx, settings->TlsSecLevel);
 #endif

--
2.19.1

With this patch applied to 2.0.0-rc4 freerdp builds and run (checked with remmina).

@akallabeth
Copy link
Member

@kapsh thx for the info, indeed annoying. Will update tomorrow

@kapsh
Copy link
Author

kapsh commented Nov 23, 2018

Thank you, it works now.

uqs pushed a commit to freebsd/freebsd-ports that referenced this issue Dec 25, 2018
…-rc4

Still broken with libressl-devel but it is another issue. Marking as BROKEN.

PR:		234198
Submitted by:	myself
Approved by:	kevans (maintainer), mentors (implicit)
Obtained from:	FreeRDP/FreeRDP#5049


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@488290 35697150-7ecd-e111-bb59-0022644237b5
swills pushed a commit to swills/freebsd-ports that referenced this issue Dec 25, 2018
…-rc4

Still broken with libressl-devel but it is another issue. Marking as BROKEN.

PR:		234198
Submitted by:	myself
Approved by:	kevans (maintainer), mentors (implicit)
Obtained from:	FreeRDP/FreeRDP#5049


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@488290 35697150-7ecd-e111-bb59-0022644237b5
uqs pushed a commit to freebsd/freebsd-ports that referenced this issue Dec 25, 2018
…-rc4

Still broken with libressl-devel but it is another issue. Marking as BROKEN.

PR:		234198
Submitted by:	myself
Approved by:	kevans (maintainer), mentors (implicit)
Obtained from:	FreeRDP/FreeRDP#5049
Jehops pushed a commit to Jehops/freebsd-ports-legacy that referenced this issue Dec 25, 2018
…-rc4

Still broken with libressl-devel but it is another issue. Marking as BROKEN.

PR:		234198
Submitted by:	myself
Approved by:	kevans (maintainer), mentors (implicit)
Obtained from:	FreeRDP/FreeRDP#5049


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@488290 35697150-7ecd-e111-bb59-0022644237b5
rc-matthew-l-weber added a commit to rc-matthew-l-weber/qpid-proton that referenced this issue Feb 5, 2019
Similar to FreeRDP/FreeRDP#5049
libressl has `#define OPENSSL_VERSION_NUMBER ` defined the same as
openssl 1.1.x which results in SSL_CTX_set_security_level() getting used.

This patch prevents SSL_CTX_set_security_level() from being used with
libressl.

Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
rc-matthew-l-weber added a commit to rc-matthew-l-weber/qpid-proton that referenced this issue Feb 5, 2019
Similar to FreeRDP/FreeRDP#5049
libressl has `#define OPENSSL_VERSION_NUMBER ` defined the same as
openssl 1.1.x which results in SSL_CTX_set_security_level() getting used.

This patch prevents SSL_CTX_set_security_level() from being used with
libressl.

Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
rc-matthew-l-weber added a commit to rc-matthew-l-weber/qpid-proton that referenced this issue Feb 7, 2019
Similar to FreeRDP/FreeRDP#5049
libressl has `#define OPENSSL_VERSION_NUMBER ` defined the same as
openssl 1.1.x which results in SSL_CTX_set_security_level() getting used.

This patch prevents SSL_CTX_set_security_level() from being used with
libressl.

https://issues.apache.org/jira/browse/PROTON-2004

Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants