Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 430294 Details for
Bug 562050
dev-qt/qtnetwork add libressl support
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to fix building with LibreSSL from Code Review.
qtnetwork-5.6-libressl.patch (text/plain), 2.96 KB, created by
Aric Belsito
on 2016-04-13 05:32:09 UTC
(
hide
)
Description:
Patch to fix building with LibreSSL from Code Review.
Filename:
MIME Type:
Creator:
Aric Belsito
Created:
2016-04-13 05:32:09 UTC
Size:
2.96 KB
patch
obsolete
>diff --git a/src/network/ssl/qsslcontext_openssl.cpp b/src/network/ssl/qsslcontext_openssl.cpp >index 68caaeb..5b8a809 100644 >--- a/src/network/ssl/qsslcontext_openssl.cpp >+++ b/src/network/ssl/qsslcontext_openssl.cpp >@@ -65,6 +65,13 @@ static DH *get_dh1024() > return dh; > } > >+static bool q_enableECSetCurves() { >+ // The ability to select elliptic curves is >+ // present in OpenSSL 1.0.2+ but not in LibreSSL. >+ // RFC4492 Section 5.1.1 "Supported Elliptic Curves Extension" >+ return q_SSLeay() >= 0x10002000L && !q_LibreSSL(); >+} >+ > QSslContext::QSslContext() > : ctx(0), > pkey(0), >@@ -340,9 +347,9 @@ init_context: > > const QVector<QSslEllipticCurve> qcurves = sslContext->sslConfiguration.ellipticCurves(); > if (!qcurves.isEmpty()) { >-#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(OPENSSL_NO_EC) >+#if defined(SSL_CTRL_SET_CURVES) && !defined(OPENSSL_NO_EC) > // Set the curves to be used >- if (q_SSLeay() >= 0x10002000L) { >+ if (q_enableECSetCurves()) { > // SSL_CTX_ctrl wants a non-const pointer as last argument, > // but let's avoid a copy into a temporary array > if (!q_SSL_CTX_ctrl(sslContext->ctx, >@@ -354,10 +361,10 @@ init_context: > return sslContext; > } > } else >-#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(OPENSSL_NO_EC) >+#endif // 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")); >+ sslContext->errorStr = msgErrorSettingEllipticCurves(QSslSocket::tr("This version of OpenSSL lacks support for selecting specific elliptic curves.")); > sslContext->errorCode = QSslError::UnspecifiedError; > return sslContext; > } >diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp >index e7829ba..7b164d0 100644 >--- a/src/network/ssl/qsslsocket_openssl_symbols.cpp >+++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp >@@ -1000,6 +1000,11 @@ bool q_resolveOpenSslSymbols() > #endif > return true; > } >+ >+bool q_LibreSSL() >+{ >+ return strncmp(q_SSLeay_version(SSLEAY_VERSION), "LibreSSL", 8) == 0; >+} > #endif // !defined QT_LINKED_OPENSSL > > //============================================================================== >diff --git a/src/network/ssl/qsslsocket_openssl_symbols_p.h b/src/network/ssl/qsslsocket_openssl_symbols_p.h >index 7f87f11..5da6ad1 100644 >--- a/src/network/ssl/qsslsocket_openssl_symbols_p.h >+++ b/src/network/ssl/qsslsocket_openssl_symbols_p.h >@@ -209,6 +209,7 @@ QT_BEGIN_NAMESPACE > #endif // !defined QT_LINKED_OPENSSL > > bool q_resolveOpenSslSymbols(); >+bool q_LibreSSL(); > long q_ASN1_INTEGER_get(ASN1_INTEGER *a); > unsigned char * q_ASN1_STRING_data(ASN1_STRING *a); > int q_ASN1_STRING_length(ASN1_STRING *a);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 562050
:
413512
|
413514
|
414236
|
428320
| 430294 |
430296
|
437876
|
462288
|
502750
|
502766
|
502770
|
502778
|
529810
|
554572
|
554574
|
555740
|
558324
|
580336
|
663100