Skip to content

Commit

Permalink
qt59.qtbase: fix with openssl-1.1.0 via Fedora patch
Browse files Browse the repository at this point in the history
  • Loading branch information
vcunat committed Feb 12, 2018
1 parent 63c5c8a commit d9e6918
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 23 deletions.
8 changes: 7 additions & 1 deletion pkgs/development/libraries/qt-5/5.9/default.nix
Expand Up @@ -37,7 +37,13 @@ let
srcs = import ./srcs.nix { inherit fetchurl; inherit mirror; };

patches = {
qtbase = [ ./qtbase.patch ] ++ optional stdenv.isDarwin ./qtbase-darwin.patch;
qtbase = [ ./qtbase.patch ] ++ optional stdenv.isDarwin ./qtbase-darwin.patch
++ [(fetchurl {
name = "openssl-1.1.0.patch";
url = "https://src.fedoraproject.org/cgit/rpms/qt5-qtbase.git/plain/"
+ "qt5-qtbase-5.9.1-openssl11.patch?id=faeac394c12e";
sha256 = "1s7b47i4vd30j2s97fcgnc7jfhga52dhsd9pqr6fvgzv5fnq68d5";
})];
qtdeclarative = [ ./qtdeclarative.patch ];
qtscript = [ ./qtscript.patch ];
qtserialport = [ ./qtserialport.patch ];
Expand Down
22 changes: 0 additions & 22 deletions pkgs/development/libraries/qt-5/5.9/qtbase.patch
Expand Up @@ -994,28 +994,6 @@ index 9a24938284..74962b4ae2 100644
if (!lib.load())
return false;
}
diff --git a/src/network/ssl/qsslcontext_openssl.cpp b/src/network/ssl/qsslcontext_openssl.cpp
index c92d8fc3f8..6008063bcf 100644
--- a/src/network/ssl/qsslcontext_openssl.cpp
+++ b/src/network/ssl/qsslcontext_openssl.cpp
@@ -351,7 +351,7 @@ init_context:

const QVector<QSslEllipticCurve> qcurves = sslContext->sslConfiguration.ellipticCurves();
if (!qcurves.isEmpty()) {
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(OPENSSL_NO_EC)
+#if OPENSSL_VERSION_NUMBER >= 0x10002000L && defined(SSL_CTRL_SET_CURVES) && !defined(OPENSSL_NO_EC)
// Set the curves to be used
if (q_SSLeay() >= 0x10002000L) {
// SSL_CTX_ctrl wants a non-const pointer as last argument,
@@ -364,7 +364,7 @@ init_context:
sslContext->errorCode = QSslError::UnspecifiedError;
}
} else
-#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(OPENSSL_NO_EC)
+#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L && defined(SSL_CTRL_SET_CURVES) && !defined(OPENSSL_NO_EC)
{
// specific curves requested, but not possible to set -> error
sslContext->errorStr = msgErrorSettingEllipticCurves(QSslSocket::tr("OpenSSL version too old, need at least v1.0.2"));
diff --git a/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp b/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp
index b5a0a5bbeb..6c20305f4d 100644
--- a/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp
Expand Down

0 comments on commit d9e6918

Please sign in to comment.