View | Details | Raw Unified | Return to bug 228344 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (+1 lines)
Lines 2-7 Link Here
2
2
3
PORTNAME=	network
3
PORTNAME=	network
4
DISTVERSION=	${QT5_VERSION}
4
DISTVERSION=	${QT5_VERSION}
5
PORTREVISION=	1
5
CATEGORIES=	net ipv6
6
CATEGORIES=	net ipv6
6
PKGNAMEPREFIX=	qt5-
7
PKGNAMEPREFIX=	qt5-
7
8
(-)files/patch-qsslcontext_openssl.cpp (+15 lines)
Line 0 Link Here
1
* 
2
* Fix for libressl atter openssl111 API change
3
*
4
*
5
--- src/network/ssl/qsslcontext_openssl.cpp.orig	2018-10-21 16:58:39 UTC
6
+++ src/network/ssl/qsslcontext_openssl.cpp
7
@@ -248,7 +248,7 @@ void QSslContext::applyBackendConfig(QSs
8
     if (sslContext->sslConfiguration.backendConfiguration().isEmpty())
9
         return;
10
 
11
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
12
+#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER)
13
     if (QSslSocket::sslLibraryVersionNumber() >= 0x10002000L) {
14
         QSharedPointer<SSL_CONF_CTX> cctx(q_SSL_CONF_CTX_new(), &q_SSL_CONF_CTX_free);
15
         if (cctx) {
(-)files/patch-src_network_ssl_qsslsocket__openssl__symbols.cpp (-10 / +33 lines)
Lines 3-10 Link Here
3
* Prepend the path of the SSL libraries used for building so the same libraries are
3
* Prepend the path of the SSL libraries used for building so the same libraries are
4
* found and loaded at runtime. Normal search finds base SSL libraries before ports.
4
* found and loaded at runtime. Normal search finds base SSL libraries before ports.
5
*
5
*
6
--- src/network/ssl/qsslsocket_openssl_symbols.cpp.orig	2018-02-08 19:24:48.000000000 +0100
6
* = =  = = = = = = = = = = = = = = = = = = = =
7
+++ src/network/ssl/qsslsocket_openssl_symbols.cpp	2018-06-29 12:22:11.265885000 +0200
7
*
8
* Fix for libressl atter openssl111 API change
9
*
10
*
11
--- src/network/ssl/qsslsocket_openssl_symbols.cpp.orig	2018-10-21 15:55:52 UTC
12
+++ src/network/ssl/qsslsocket_openssl_symbols.cpp
8
@@ -150,6 +150,14 @@ DEFINEFUNC2(int, BN_is_word, BIGNUM *a, 
13
@@ -150,6 +150,14 @@ DEFINEFUNC2(int, BN_is_word, BIGNUM *a, 
9
 DEFINEFUNC(int, EVP_CIPHER_CTX_reset, EVP_CIPHER_CTX *c, c, return 0, return)
14
 DEFINEFUNC(int, EVP_CIPHER_CTX_reset, EVP_CIPHER_CTX *c, c, return 0, return)
10
 DEFINEFUNC(int, EVP_PKEY_base_id, EVP_PKEY *a, a, return NID_undef, return)
15
 DEFINEFUNC(int, EVP_PKEY_base_id, EVP_PKEY *a, a, return NID_undef, return)
Lines 38-44 Link Here
38
 DEFINEFUNC(EVP_PKEY *, X509_get_pubkey, X509 *a, a, return 0, return)
43
 DEFINEFUNC(EVP_PKEY *, X509_get_pubkey, X509 *a, a, return 0, return)
39
 DEFINEFUNC2(void, X509_STORE_set_verify_cb, X509_STORE *a, a, X509_STORE_CTX_verify_cb verify_cb, verify_cb, return, DUMMYARG)
44
 DEFINEFUNC2(void, X509_STORE_set_verify_cb, X509_STORE *a, a, X509_STORE_CTX_verify_cb verify_cb, verify_cb, return, DUMMYARG)
40
 DEFINEFUNC(STACK_OF(X509) *, X509_STORE_CTX_get0_chain, X509_STORE_CTX *a, a, return 0, return)
45
 DEFINEFUNC(STACK_OF(X509) *, X509_STORE_CTX_get0_chain, X509_STORE_CTX *a, a, return 0, return)
41
@@ -524,6 +535,9 @@ DEFINEFUNC(void, EC_KEY_free, EC_KEY *ec
46
@@ -406,7 +417,7 @@ DEFINEFUNC2(int, SSL_CTX_use_PrivateKey,
47
 DEFINEFUNC2(int, SSL_CTX_use_RSAPrivateKey, SSL_CTX *a, a, RSA *b, b, return -1, return)
48
 DEFINEFUNC3(int, SSL_CTX_use_PrivateKey_file, SSL_CTX *a, a, const char *b, b, int c, c, return -1, return)
49
 DEFINEFUNC(X509_STORE *, SSL_CTX_get_cert_store, const SSL_CTX *a, a, return 0, return)
50
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
51
+#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER)
52
 DEFINEFUNC(SSL_CONF_CTX *, SSL_CONF_CTX_new, DUMMYARG, DUMMYARG, return 0, return);
53
 DEFINEFUNC(void, SSL_CONF_CTX_free, SSL_CONF_CTX *a, a, return ,return);
54
 DEFINEFUNC2(void, SSL_CONF_CTX_set_ssl_ctx, SSL_CONF_CTX *a, a, SSL_CTX *b, b, return, return);
55
@@ -537,6 +548,9 @@ DEFINEFUNC(void, EC_KEY_free, EC_KEY *ec
42
 DEFINEFUNC2(size_t, EC_get_builtin_curves, EC_builtin_curve * r, r, size_t nitems, nitems, return 0, return)
56
 DEFINEFUNC2(size_t, EC_get_builtin_curves, EC_builtin_curve * r, r, size_t nitems, nitems, return 0, return)
43
 #if OPENSSL_VERSION_NUMBER >= 0x10002000L
57
 #if OPENSSL_VERSION_NUMBER >= 0x10002000L
44
 DEFINEFUNC(int, EC_curve_nist2nid, const char *name, name, return 0, return)
58
 DEFINEFUNC(int, EC_curve_nist2nid, const char *name, name, return 0, return)
Lines 48-54 Link Here
48
 #endif // OPENSSL_VERSION_NUMBER >= 0x10002000L
62
 #endif // OPENSSL_VERSION_NUMBER >= 0x10002000L
49
 #endif // OPENSSL_NO_EC
63
 #endif // OPENSSL_NO_EC
50
 
64
 
51
@@ -769,8 +783,8 @@ static QPair<QLibrary*, QLibrary*> loadO
65
@@ -782,8 +796,8 @@ static QPair<QLibrary*, QLibrary*> loadO
52
 #endif
66
 #endif
53
 #if defined(SHLIB_VERSION_NUMBER) && !defined(Q_OS_QNX) // on QNX, the libs are always libssl.so and libcrypto.so
67
 #if defined(SHLIB_VERSION_NUMBER) && !defined(Q_OS_QNX) // on QNX, the libs are always libssl.so and libcrypto.so
54
     // first attempt: the canonical name is libssl.so.<SHLIB_VERSION_NUMBER>
68
     // first attempt: the canonical name is libssl.so.<SHLIB_VERSION_NUMBER>
Lines 59-65 Link Here
59
     if (libcrypto->load() && libssl->load()) {
73
     if (libcrypto->load() && libssl->load()) {
60
         // libssl.so.<SHLIB_VERSION_NUMBER> and libcrypto.so.<SHLIB_VERSION_NUMBER> found
74
         // libssl.so.<SHLIB_VERSION_NUMBER> and libcrypto.so.<SHLIB_VERSION_NUMBER> found
61
         return pair;
75
         return pair;
62
@@ -787,8 +801,8 @@ static QPair<QLibrary*, QLibrary*> loadO
76
@@ -800,8 +814,8 @@ static QPair<QLibrary*, QLibrary*> loadO
63
     //  macOS's /usr/lib/libssl.dylib, /usr/lib/libcrypto.dylib will be picked up in the third
77
     //  macOS's /usr/lib/libssl.dylib, /usr/lib/libcrypto.dylib will be picked up in the third
64
     //    attempt, _after_ <bundle>/Contents/Frameworks has been searched.
78
     //    attempt, _after_ <bundle>/Contents/Frameworks has been searched.
65
     //  iOS does not ship a system libssl.dylib, libcrypto.dylib in the first place.
79
     //  iOS does not ship a system libssl.dylib, libcrypto.dylib in the first place.
Lines 70-76 Link Here
70
     if (libcrypto->load() && libssl->load()) {
84
     if (libcrypto->load() && libssl->load()) {
71
         // libssl.so.0 and libcrypto.so.0 found
85
         // libssl.so.0 and libcrypto.so.0 found
72
         return pair;
86
         return pair;
73
@@ -872,17 +886,30 @@ bool q_resolveOpenSslSymbols()
87
@@ -885,17 +899,30 @@ bool q_resolveOpenSslSymbols()
74
     RESOLVEFUNC(EVP_CIPHER_CTX_reset)
88
     RESOLVEFUNC(EVP_CIPHER_CTX_reset)
75
     RESOLVEFUNC(EVP_PKEY_base_id)
89
     RESOLVEFUNC(EVP_PKEY_base_id)
76
     RESOLVEFUNC(RSA_bits)
90
     RESOLVEFUNC(RSA_bits)
Lines 102-108 Link Here
102
     RESOLVEFUNC(SSL_get_session)
116
     RESOLVEFUNC(SSL_get_session)
103
     RESOLVEFUNC(CRYPTO_get_ex_new_index)
117
     RESOLVEFUNC(CRYPTO_get_ex_new_index)
104
     RESOLVEFUNC(TLS_method)
118
     RESOLVEFUNC(TLS_method)
105
@@ -891,7 +918,9 @@ bool q_resolveOpenSslSymbols()
119
@@ -904,7 +931,9 @@ bool q_resolveOpenSslSymbols()
106
     RESOLVEFUNC(X509_STORE_CTX_get0_chain)
120
     RESOLVEFUNC(X509_STORE_CTX_get0_chain)
107
     RESOLVEFUNC(X509_getm_notBefore)
121
     RESOLVEFUNC(X509_getm_notBefore)
108
     RESOLVEFUNC(X509_getm_notAfter)
122
     RESOLVEFUNC(X509_getm_notAfter)
Lines 112-118 Link Here
112
     RESOLVEFUNC(X509_get_pubkey)
126
     RESOLVEFUNC(X509_get_pubkey)
113
     RESOLVEFUNC(X509_STORE_set_verify_cb)
127
     RESOLVEFUNC(X509_STORE_set_verify_cb)
114
     RESOLVEFUNC(CRYPTO_free)
128
     RESOLVEFUNC(CRYPTO_free)
115
@@ -908,7 +937,9 @@ bool q_resolveOpenSslSymbols()
129
@@ -921,7 +950,9 @@ bool q_resolveOpenSslSymbols()
116
 
130
 
117
     RESOLVEFUNC(SSL_SESSION_get_ticket_lifetime_hint)
131
     RESOLVEFUNC(SSL_SESSION_get_ticket_lifetime_hint)
118
     RESOLVEFUNC(DH_bits)
132
     RESOLVEFUNC(DH_bits)
Lines 122-128 Link Here
122
 
136
 
123
 #else // !opensslv11
137
 #else // !opensslv11
124
 
138
 
125
@@ -979,10 +1010,9 @@ bool q_resolveOpenSslSymbols()
139
@@ -992,10 +1023,9 @@ bool q_resolveOpenSslSymbols()
126
     RESOLVEFUNC(OPENSSL_add_all_algorithms_conf)
140
     RESOLVEFUNC(OPENSSL_add_all_algorithms_conf)
127
     RESOLVEFUNC(SSLeay)
141
     RESOLVEFUNC(SSLeay)
128
 
142
 
Lines 134-140 Link Here
134
         delete libs.first;
148
         delete libs.first;
135
         delete libs.second;
149
         delete libs.second;
136
         qCWarning(lcSsl, "Incompatible version of OpenSSL");
150
         qCWarning(lcSsl, "Incompatible version of OpenSSL");
137
@@ -994,8 +1024,12 @@ bool q_resolveOpenSslSymbols()
151
@@ -1007,8 +1037,12 @@ bool q_resolveOpenSslSymbols()
138
 
152
 
139
 #ifndef OPENSSL_NO_EC
153
 #ifndef OPENSSL_NO_EC
140
 #if OPENSSL_VERSION_NUMBER >= 0x10002000L
154
 #if OPENSSL_VERSION_NUMBER >= 0x10002000L
Lines 148-150 Link Here
148
 #endif // OPENSSL_VERSION_NUMBER >= 0x10002000L
162
 #endif // OPENSSL_VERSION_NUMBER >= 0x10002000L
149
 #endif // OPENSSL_NO_EC
163
 #endif // OPENSSL_NO_EC
150
 
164
 
165
@@ -1122,7 +1156,7 @@ bool q_resolveOpenSslSymbols()
166
     RESOLVEFUNC(SSL_CTX_use_RSAPrivateKey)
167
     RESOLVEFUNC(SSL_CTX_use_PrivateKey_file)
168
     RESOLVEFUNC(SSL_CTX_get_cert_store);
169
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
170
+#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER)
171
     RESOLVEFUNC(SSL_CONF_CTX_new);
172
     RESOLVEFUNC(SSL_CONF_CTX_free);
173
     RESOLVEFUNC(SSL_CONF_CTX_set_ssl_ctx);
(-)files/patch-src_network_ssl_qsslsocket__openssl__symbols__p.h (-2 / +29 lines)
Lines 1-7 Link Here
1
Boilerplate for SSL_CTX_set1_groups() used in qsslcontext_openssl.cpp.
1
Boilerplate for SSL_CTX_set1_groups() used in qsslcontext_openssl.cpp.
2
--- src/network/ssl/qsslsocket_openssl_symbols_p.h.orig	2018-02-08 18:24:48 UTC
2
*
3
* Fix for libressl atter openssl111 API change
4
*
5
*
6
--- src/network/ssl/qsslsocket_openssl_symbols_p.h.orig	2018-10-21 17:04:11 UTC
3
+++ src/network/ssl/qsslsocket_openssl_symbols_p.h
7
+++ src/network/ssl/qsslsocket_openssl_symbols_p.h
4
@@ -454,6 +454,9 @@ void q_EC_KEY_free(EC_KEY *ecdh);
8
@@ -74,6 +74,13 @@
9
 
10
 QT_BEGIN_NAMESPACE
11
 
12
+#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x20700000L
13
+# define TLS1_2_VERSION 0x0303
14
+# define TLS_MAX_VERSION TLS1_2_VERSION
15
+# define TLS_ANY_VERSION 0x10000
16
+#endif
17
+
18
+
19
 #define DUMMYARG
20
 
21
 #if !defined QT_LINKED_OPENSSL
22
@@ -356,7 +363,7 @@ int q_SSL_CTX_use_PrivateKey(SSL_CTX *a,
23
 int q_SSL_CTX_use_RSAPrivateKey(SSL_CTX *a, RSA *b);
24
 int q_SSL_CTX_use_PrivateKey_file(SSL_CTX *a, const char *b, int c);
25
 X509_STORE *q_SSL_CTX_get_cert_store(const SSL_CTX *a);
26
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
27
+#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER)
28
 SSL_CONF_CTX *q_SSL_CONF_CTX_new();
29
 void q_SSL_CONF_CTX_free(SSL_CONF_CTX *a);
30
 void q_SSL_CONF_CTX_set_ssl_ctx(SSL_CONF_CTX *a, SSL_CTX *b);
31
@@ -468,6 +475,9 @@ void q_EC_KEY_free(EC_KEY *ecdh);
5
 size_t q_EC_get_builtin_curves(EC_builtin_curve *r, size_t nitems);
32
 size_t q_EC_get_builtin_curves(EC_builtin_curve *r, size_t nitems);
6
 #if OPENSSL_VERSION_NUMBER >= 0x10002000L
33
 #if OPENSSL_VERSION_NUMBER >= 0x10002000L
7
 int q_EC_curve_nist2nid(const char *name);
34
 int q_EC_curve_nist2nid(const char *name);

Return to bug 228344