Skip to content

Commit

Permalink
dev-qt/qtcore: fix building against libressl
Browse files Browse the repository at this point in the history
Patch from libressl overlay.

Closes: gentoo#4409
Gentoo-Bug: 584796

Package-Manager: Portage-2.3.5, Repoman-2.3.2
  • Loading branch information
mingzym authored and Pesa committed May 14, 2017
1 parent 20ce60d commit 43c1032
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
52 changes: 52 additions & 0 deletions dev-qt/qtcore/files/qtcore-4.8.7-libressl.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
--- src/network/ssl/qsslsocket_openssl_symbols.cpp.orig 2015-11-25 01:38:42.103898399 -0500
+++ src/network/ssl/qsslsocket_openssl_symbols.cpp 2015-11-25 01:40:50.146247648 -0500
@@ -224,13 +224,17 @@
#ifndef OPENSSL_NO_SSL2
DEFINEFUNC(const SSL_METHOD *, SSLv2_client_method, DUMMYARG, DUMMYARG, return 0, return)
#endif
+#ifndef OPENSSL_NO_SSL3
DEFINEFUNC(const SSL_METHOD *, SSLv3_client_method, DUMMYARG, DUMMYARG, return 0, return)
+#endif
DEFINEFUNC(const SSL_METHOD *, SSLv23_client_method, DUMMYARG, DUMMYARG, return 0, return)
DEFINEFUNC(const SSL_METHOD *, TLSv1_client_method, DUMMYARG, DUMMYARG, return 0, return)
#ifndef OPENSSL_NO_SSL2
DEFINEFUNC(const SSL_METHOD *, SSLv2_server_method, DUMMYARG, DUMMYARG, return 0, return)
#endif
+#ifndef OPENSSL_NO_SSL3
DEFINEFUNC(const SSL_METHOD *, SSLv3_server_method, DUMMYARG, DUMMYARG, return 0, return)
+#endif
DEFINEFUNC(const SSL_METHOD *, SSLv23_server_method, DUMMYARG, DUMMYARG, return 0, return)
DEFINEFUNC(const SSL_METHOD *, TLSv1_server_method, DUMMYARG, DUMMYARG, return 0, return)
#else
@@ -818,13 +822,17 @@
#ifndef OPENSSL_NO_SSL2
RESOLVEFUNC(SSLv2_client_method)
#endif
+#ifndef OPENSSL_NO_SSL3
RESOLVEFUNC(SSLv3_client_method)
+#endif
RESOLVEFUNC(SSLv23_client_method)
RESOLVEFUNC(TLSv1_client_method)
#ifndef OPENSSL_NO_SSL2
RESOLVEFUNC(SSLv2_server_method)
#endif
+#ifndef OPENSSL_NO_SSL3
RESOLVEFUNC(SSLv3_server_method)
+#endif
RESOLVEFUNC(SSLv23_server_method)
RESOLVEFUNC(TLSv1_server_method)
RESOLVEFUNC(X509_NAME_entry_count)
--- src/network/ssl/qsslsocket_openssl.cpp.orig 2015-11-25 01:44:55.235087906 -0500
+++ src/network/ssl/qsslsocket_openssl.cpp 2015-11-25 01:45:45.194443818 -0500
@@ -263,7 +263,11 @@
#endif
break;
case QSsl::SslV3:
+#ifndef OPENSSL_NO_SSL3
ctx = q_SSL_CTX_new(client ? q_SSLv3_client_method() : q_SSLv3_server_method());
+#else
+ ctx = 0; // SSL 3 not supported by the system, but chosen deliberately -> error
+#endif
break;
case QSsl::SecureProtocols: // SslV2 will be disabled below
case QSsl::TlsV1SslV3: // SslV2 will be disabled below
1 change: 1 addition & 0 deletions dev-qt/qtcore/qtcore-4.8.7-r2.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ PATCHES=(
"${FILESDIR}/${PN}-4.8.5-honor-ExcludeSocketNotifiers-in-glib-event-loop.patch" # bug 514968
"${FILESDIR}/${PN}-4.8.5-qeventdispatcher-recursive.patch" # bug 514968
"${FILESDIR}/${PN}-4.8.6-moc-boost-1.60.patch" # bug 556104
"${FILESDIR}/${PN}-4.8.7-libressl.patch" # bug 584796
)

QT4_TARGET_DIRECTORIES="
Expand Down

0 comments on commit 43c1032

Please sign in to comment.