Line 0
Link Here
|
|
|
1 |
From 81494e67eccba04fc3fe554d76a9ca6fe7f2250e Mon Sep 17 00:00:00 2001 |
2 |
From: hasufell <hasufell@gentoo.org> |
3 |
Date: Sat, 10 Oct 2015 01:15:01 +0200 |
4 |
Subject: [PATCH] Fix compilation with libressl |
5 |
|
6 |
By additionally checking for defined(SSL_CTRL_SET_CURVES), which |
7 |
is defined in openssl, but not in libressl. |
8 |
--- |
9 |
src/network/ssl/qsslcontext_openssl.cpp | 4 ++-- |
10 |
1 file changed, 2 insertions(+), 2 deletions(-) |
11 |
|
12 |
diff --git a/src/network/ssl/qsslcontext_openssl.cpp b/src/network/ssl/qsslcontext_openssl.cpp |
13 |
index b88ab54..cfc4f6d 100644 |
14 |
--- src/network/ssl/qsslcontext_openssl.cpp.orig |
15 |
+++ src/network/ssl/qsslcontext_openssl.cpp |
16 |
@@ -338,7 +338,7 @@ init_context: |
17 |
|
18 |
const QVector<QSslEllipticCurve> qcurves = sslContext->sslConfiguration.ellipticCurves(); |
19 |
if (!qcurves.isEmpty()) { |
20 |
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(OPENSSL_NO_EC) |
21 |
+#if OPENSSL_VERSION_NUMBER >= 0x10002000L && defined(SSL_CTRL_SET_CURVES) && !defined(OPENSSL_NO_EC) |
22 |
// Set the curves to be used |
23 |
if (q_SSLeay() >= 0x10002000L) { |
24 |
// SSL_CTX_ctrl wants a non-const pointer as last argument, |
25 |
@@ -352,7 +352,7 @@ init_context: |
26 |
return sslContext; |
27 |
} |
28 |
} else |
29 |
-#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(OPENSSL_NO_EC) |
30 |
+#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L && defined(SSL_CTRL_SET_CURVES) && !defined(OPENSSL_NO_EC) |
31 |
{ |
32 |
// specific curves requested, but not possible to set -> error |
33 |
sslContext->errorStr = msgErrorSettingEllipticCurves(QSslSocket::tr("OpenSSL version too old, need at least v1.0.2")); |
34 |
-- |
35 |
2.6.0 |