aboutsummaryrefslogtreecommitdiffstats
path: root/main/qt5-qtbase/libressl-compat.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/qt5-qtbase/libressl-compat.patch')
-rw-r--r--main/qt5-qtbase/libressl-compat.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/main/qt5-qtbase/libressl-compat.patch b/main/qt5-qtbase/libressl-compat.patch
new file mode 100644
index 0000000000..cc6d3aadbe
--- /dev/null
+++ b/main/qt5-qtbase/libressl-compat.patch
@@ -0,0 +1,38 @@
+The checks for OPENSSL_VERSION_NUMBER > 0x10002000 are used to
+enable openssl specific macros and functions which libressl
+obviously does not provide, thus add some additional tests
+to disable that code for libressl.
+
+--- qtbase/src/network/ssl/qsslcontext_openssl.cpp 2015-06-29 22:04:46.000000000 +0200
++++ qtbase/src/network/ssl/qsslcontext_openssl.cpp 2015-07-04 03:51:25.926570550 +0200
+@@ -338,7 +338,7 @@
+
+ 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(OPENSSL_NO_EC) && defined(SSL_CTRL_SET_CURVES)
+ // Set the curves to be used
+ if (q_SSLeay() >= 0x10002000L) {
+ // SSL_CTX_ctrl wants a non-const pointer as last argument,
+--- qtbase/src/network/ssl/qsslsocket_openssl_symbols.cpp 2015-06-29 22:04:46.000000000 +0200
++++ qtbase/src/network/ssl/qsslsocket_openssl_symbols.cpp 2015-07-04 03:58:29.430569295 +0200
+@@ -406,7 +406,7 @@
+ DEFINEFUNC(EC_KEY *, EC_KEY_new_by_curve_name, int nid, nid, return 0, return)
+ DEFINEFUNC(void, EC_KEY_free, EC_KEY *ecdh, ecdh, return, DUMMYARG)
+ DEFINEFUNC2(size_t, EC_get_builtin_curves, EC_builtin_curve * r, r, size_t nitems, nitems, return 0, return)
+-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
++#if (OPENSSL_VERSION_NUMBER >= 0x10002000L) && !defined(LIBRESSL_VERSION_NUMBER)
+ DEFINEFUNC(int, EC_curve_nist2nid, const char *name, name, return 0, return)
+ #endif // OPENSSL_VERSION_NUMBER >= 0x10002000L
+ #endif // OPENSSL_NO_EC
+--- qtbase/src/network/ssl/qsslellipticcurve_openssl.cpp 2015-07-04 04:05:26.110568061 +0200
++++ qtbase/src/network/ssl/qsslellipticcurve_openssl.cpp 2015-07-04 04:06:01.709567956 +0200
+@@ -76,7 +76,7 @@
+
+ int nid = q_OBJ_sn2nid(curveNameLatin1.data());
+
+-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
++#if (OPENSSL_VERSION_NUMBER >= 0x10002000L) && !defined(LIBRESSL_VERSION_NUMBER)
+ if (nid == 0 && q_SSLeay() >= 0x10002000L)
+ nid = q_EC_curve_nist2nid(curveNameLatin1.data());
+ #endif // OPENSSL_VERSION_NUMBER >= 0x10002000L