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 after 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); |