synergy: add patch to build with openssl 1.1

This commit is contained in:
Robin Gloster 2017-07-22 19:42:26 +02:00
parent d0aca4cba1
commit 3d90c689cf
No known key found for this signature in database
GPG Key ID: 5E4C836C632C2882
2 changed files with 21 additions and 1 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, cmake, xlibsWrapper, libX11, libXi, libXtst, libXrandr
{ stdenv, fetchFromGitHub, fetchpatch, cmake, xlibsWrapper, libX11, libXi, libXtst, libXrandr
, xinput, curl, openssl, unzip }:
with stdenv.lib;
@ -14,6 +14,8 @@ stdenv.mkDerivation rec {
sha256 = "0ksgr9hkf09h54572p7k7b9zkfhcdb2g2d5x7ixxn028y8i3jyp3";
};
patches = [ ./openssl-1.1.patch ];
postPatch = ''
${unzip}/bin/unzip -d ext/gmock-1.6.0 ext/gmock-1.6.0.zip
${unzip}/bin/unzip -d ext/gtest-1.6.0 ext/gtest-1.6.0.zip

View File

@ -0,0 +1,18 @@
--- a/src/lib/net/SecureSocket.cpp 2017-07-22 19:33:22.442645291 +0200
+++ b/src/lib/net/SecureSocket.cpp 2017-07-22 19:36:25.632595581 +0200
@@ -805,9 +805,14 @@
showCipherStackDesc(sStack);
}
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
// m_ssl->m_ssl->session->ciphers is not forward compatable, In future release
- // of OpenSSL, it's not visible, need to use SSL_get_client_ciphers() instead
+ // of OpenSSL, it's not visible
STACK_OF(SSL_CIPHER) * cStack = m_ssl->m_ssl->session->ciphers;
+#else
+ // Use SSL_get_client_ciphers() for newer versions
+ STACK_OF(SSL_CIPHER) * cStack = SSL_get_client_ciphers(m_ssl->m_ssl);
+#endif
if (cStack == NULL) {
LOG((CLOG_DEBUG1 "remote cipher list not available"));
}