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

Collapse All | Expand All

(-)files/patch-src_network_ssl_qsslsocket__openssl.cpp (-5 / +103 lines)
Lines 1-8 Link Here
1
* Make availability of SSLv3 in Qt4 same as in Qt5, i.e. not part of SecureProtocols
1
--- src/network/ssl/qsslsocket_openssl.cpp.orig	2018-11-11 08:49:48 UTC
2
*
3
--- src/network/ssl/qsslsocket_openssl.cpp.orig	2015-05-07 14:14:44 UTC
4
+++ src/network/ssl/qsslsocket_openssl.cpp
2
+++ src/network/ssl/qsslsocket_openssl.cpp
5
@@ -267,9 +267,13 @@ init_context:
3
@@ -93,6 +93,7 @@ bool QSslSocketPrivate::s_libraryLoaded 
4
 bool QSslSocketPrivate::s_loadedCiphersAndCerts = false;
5
 bool QSslSocketPrivate::s_loadRootCertsOnDemand = false;
6
 
7
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
8
 /* \internal
9
 
10
     From OpenSSL's thread(3) manual page:
11
@@ -174,6 +175,8 @@ static unsigned long id_function()
12
 }
13
 } // extern "C"
14
 
15
+#endif //OPENSSL_VERSION_NUMBER >= 0x10100000L
16
+
17
 QSslSocketBackendPrivate::QSslSocketBackendPrivate()
18
     : ssl(0),
19
       ctx(0),
20
@@ -222,9 +225,12 @@ QSslCipher QSslSocketBackendPrivate::QSs
21
             ciph.d->encryptionMethod = descriptionList.at(4).mid(4);
22
         ciph.d->exportable = (descriptionList.size() > 6 && descriptionList.at(6) == QLatin1String("export"));
23
 
24
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
25
         ciph.d->bits = cipher->strength_bits;
26
         ciph.d->supportedBits = cipher->alg_bits;
27
-
28
+#else
29
+	ciph.d->bits = q_SSL_CIPHER_get_bits(cipher, &ciph.d->supportedBits);
30
+#endif
31
     }
32
     return ciph;
33
 }
34
@@ -267,9 +273,13 @@ init_context:
6
 #endif
35
 #endif
7
         break;
36
         break;
8
     case QSsl::SslV3:
37
     case QSsl::SslV3:
Lines 17-23 Link Here
17
     case QSsl::TlsV1SslV3: // SslV2 will be disabled below
46
     case QSsl::TlsV1SslV3: // SslV2 will be disabled below
18
     case QSsl::AnyProtocol:
47
     case QSsl::AnyProtocol:
19
     default:
48
     default:
20
@@ -297,8 +301,10 @@ init_context:
49
@@ -297,8 +307,10 @@ init_context:
21
 
50
 
22
     // Enable bug workarounds.
51
     // Enable bug workarounds.
23
     long options;
52
     long options;
Lines 29-31 Link Here
29
     else
58
     else
30
         options = SSL_OP_ALL;
59
         options = SSL_OP_ALL;
31
 
60
 
61
@@ -363,7 +375,7 @@ init_context:
62
         //
63
         // See also: QSslContext::fromConfiguration()
64
         if (caCertificate.expiryDate() >= QDateTime::currentDateTime()) {
65
-            q_X509_STORE_add_cert(ctx->cert_store, (X509 *)caCertificate.handle());
66
+	  q_X509_STORE_add_cert(q_SSL_CTX_get_cert_store(ctx), (X509 *)caCertificate.handle());
67
         }
68
     }
69
 
70
@@ -500,8 +512,10 @@ void QSslSocketBackendPrivate::destroySs
71
 */
72
 void QSslSocketPrivate::deinitialize()
73
 {
74
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
75
     q_CRYPTO_set_id_callback(0);
76
     q_CRYPTO_set_locking_callback(0);
77
+#endif
78
 }
79
 
80
 /*!
81
@@ -522,13 +536,17 @@ bool QSslSocketPrivate::ensureLibraryLoa
82
         return false;
83
 
84
     // Check if the library itself needs to be initialized.
85
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
86
     QMutexLocker locker(openssl_locks()->initLock());
87
+#endif
88
     if (!s_libraryLoaded) {
89
         s_libraryLoaded = true;
90
 
91
         // Initialize OpenSSL.
92
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
93
         q_CRYPTO_set_id_callback(id_function);
94
         q_CRYPTO_set_locking_callback(locking_function);
95
+#endif
96
         if (q_SSL_library_init() != 1)
97
             return false;
98
         q_SSL_load_error_strings();
99
@@ -567,7 +585,9 @@ bool QSslSocketPrivate::ensureLibraryLoa
100
 
101
 void QSslSocketPrivate::ensureCiphersAndCertsLoaded()
102
 {
103
-    QMutexLocker locker(openssl_locks()->initLock());
104
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
105
+  QMutexLocker locker(openssl_locks()->initLock());
106
+#endif
107
     if (s_loadedCiphersAndCerts)
108
         return;
109
     s_loadedCiphersAndCerts = true;
110
@@ -659,13 +679,18 @@ void QSslSocketPrivate::resetDefaultCiph
111
     STACK_OF(SSL_CIPHER) *supportedCiphers = q_SSL_get_ciphers(mySsl);
112
     for (int i = 0; i < q_sk_SSL_CIPHER_num(supportedCiphers); ++i) {
113
         if (SSL_CIPHER *cipher = q_sk_SSL_CIPHER_value(supportedCiphers, i)) {
114
-            if (cipher->valid) {
115
+
116
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
117
+	  if (cipher->valid) {
118
+#endif
119
                 QSslCipher ciph = QSslSocketBackendPrivate::QSslCipher_from_SSL_CIPHER(cipher);
120
                 if (!ciph.isNull()) {
121
                     if (!ciph.name().toLower().startsWith(QLatin1String("adh")))
122
                         ciphers << ciph;
123
                 }
124
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
125
             }
126
+#endif
127
         }
128
     }
129
 
(-)files/patch-src_network_ssl_qsslsocket__openssl__symbols.cpp (-24 / +283 lines)
Lines 1-28 Link Here
1
* Prepend the path of the SSL libraries used for building so the same libraries are
2
* found and loaded at runtime. Normal search finds base SSL libraries before ports.
3
*
4
--- src/network/ssl/qsslsocket_openssl_symbols.cpp.orig	2015-05-07 14:14:44 UTC
1
--- src/network/ssl/qsslsocket_openssl_symbols.cpp.orig	2015-05-07 14:14:44 UTC
5
+++ src/network/ssl/qsslsocket_openssl_symbols.cpp
2
+++ src/network/ssl/qsslsocket_openssl_symbols.cpp
6
@@ -511,9 +511,9 @@ static QPair<QLibrary*, QLibrary*> loadO
3
@@ -117,9 +117,11 @@ DEFINEFUNC3(int, BIO_read, BIO *a, a, vo
7
     libcrypto->setLoadHints(libcrypto->loadHints() | QLibrary::ImprovedSearchHeuristics);
4
 DEFINEFUNC(BIO_METHOD *, BIO_s_mem, void, DUMMYARG, return 0, return)
8
 #elif defined(SHLIB_VERSION_NUMBER)
5
 DEFINEFUNC3(int, BIO_write, BIO *a, a, const void *b, b, int c, c, return -1, return)
9
     // first attempt: the canonical name is libssl.so.<SHLIB_VERSION_NUMBER>
6
 DEFINEFUNC(int, BN_num_bits, const BIGNUM *a, a, return 0, return)
10
-    libssl->setFileNameAndVersion(QLatin1String("ssl"), QLatin1String(SHLIB_VERSION_NUMBER));
7
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
11
+    libssl->setFileNameAndVersion(QLatin1String("%%OPENSSLLIB%%/libssl"), QLatin1String(SHLIB_VERSION_NUMBER));
8
 DEFINEFUNC(int, CRYPTO_num_locks, DUMMYARG, DUMMYARG, return 0, return)
12
     libssl->setLoadHints(QLibrary::ImprovedSearchHeuristics);
9
 DEFINEFUNC(void, CRYPTO_set_locking_callback, void (*a)(int, int, const char *, int), a, return, DUMMYARG)
13
-    libcrypto->setFileNameAndVersion(QLatin1String("crypto"), QLatin1String(SHLIB_VERSION_NUMBER));
10
 DEFINEFUNC(void, CRYPTO_set_id_callback, unsigned long (*a)(), a, return, DUMMYARG)
14
+    libcrypto->setFileNameAndVersion(QLatin1String("%%OPENSSLLIB%%/libcrypto"), QLatin1String(SHLIB_VERSION_NUMBER));
11
+#endif
15
     libcrypto->setLoadHints(libcrypto->loadHints() | QLibrary::ImprovedSearchHeuristics);
12
 DEFINEFUNC(void, CRYPTO_free, void *a, a, return, DUMMYARG)
16
     if (libcrypto->load() && libssl->load()) {
13
 DEFINEFUNC(void, DSA_free, DSA *a, a, return, DUMMYARG)
17
         // libssl.so.<SHLIB_VERSION_NUMBER> and libcrypto.so.<SHLIB_VERSION_NUMBER> found
14
 #if  OPENSSL_VERSION_NUMBER < 0x00908000L
18
@@ -525,8 +525,8 @@ static QPair<QLibrary*, QLibrary*> loadO
15
@@ -157,6 +159,7 @@ DEFINEFUNC2(int, PEM_write_bio_RSA_PUBKE
16
 DEFINEFUNC2(void, RAND_seed, const void *a, a, int b, b, return, DUMMYARG)
17
 DEFINEFUNC(int, RAND_status, void, DUMMYARG, return -1, return)
18
 DEFINEFUNC(void, RSA_free, RSA *a, a, return, DUMMYARG)
19
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
20
 DEFINEFUNC(int, sk_num, STACK *a, a, return -1, return)
21
 DEFINEFUNC2(void, sk_pop_free, STACK *a, a, void (*b)(void*), b, return, DUMMYARG)
22
 #if OPENSSL_VERSION_NUMBER >= 0x10000000L
23
@@ -166,6 +169,12 @@ DEFINEFUNC2(void *, sk_value, STACK *a, 
24
 DEFINEFUNC(void, sk_free, STACK *a, a, return, DUMMYARG)
25
 DEFINEFUNC2(char *, sk_value, STACK *a, a, int b, b, return 0, return)
19
 #endif
26
 #endif
27
+#else
28
+DEFINEFUNC(int, OPENSSL_sk_num, STACK *a, a, return -1, return)
29
+DEFINEFUNC2(void, OPENSSL_sk_pop_free, STACK *a, a, void (*b)(void*), b, return, DUMMYARG)
30
+DEFINEFUNC(void, OPENSSL_sk_free, _STACK *a, a, return, DUMMYARG)
31
+DEFINEFUNC2(void *, OPENSSL_sk_value, STACK *a, a, int b, b, return 0, return)
32
+#endif
33
 DEFINEFUNC(int, SSL_accept, SSL *a, a, return -1, return)
34
 DEFINEFUNC(int, SSL_clear, SSL *a, a, return -1, return)
35
 DEFINEFUNC3(char *, SSL_CIPHER_description, SSL_CIPHER *a, a, char *b, b, int c, c, return 0, return)
36
@@ -213,8 +222,12 @@ DEFINEFUNC(long, SSL_get_verify_result, 
37
 #else
38
 DEFINEFUNC(long, SSL_get_verify_result, SSL *a, a, return -1, return)
39
 #endif
40
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
41
 DEFINEFUNC(int, SSL_library_init, void, DUMMYARG, return -1, return)
42
 DEFINEFUNC(void, SSL_load_error_strings, void, DUMMYARG, return, DUMMYARG)
43
+#else
44
+DEFINEFUNC2(int, OPENSSL_init_ssl, uint64_t opts, opts, void *settings, settings, return -1, return)
45
+#endif
46
 DEFINEFUNC(SSL *, SSL_new, SSL_CTX *a, a, return 0, return)
47
 #if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT)
48
 DEFINEFUNC4(long, SSL_ctrl, SSL *a, a, int cmd, cmd, long larg, larg, void *parg, parg, return -1, return)
49
@@ -229,13 +242,21 @@ DEFINEFUNC(int, SSL_shutdown, SSL *a, a,
50
 DEFINEFUNC(const SSL_METHOD *, SSLv2_client_method, DUMMYARG, DUMMYARG, return 0, return)
51
 #endif
52
 DEFINEFUNC(const SSL_METHOD *, SSLv3_client_method, DUMMYARG, DUMMYARG, return 0, return)
53
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
54
 DEFINEFUNC(const SSL_METHOD *, SSLv23_client_method, DUMMYARG, DUMMYARG, return 0, return)
55
+#else
56
+DEFINEFUNC(const SSL_METHOD *, TLS_client_method, DUMMYARG, DUMMYARG, return 0, return)
57
+#endif
58
 DEFINEFUNC(const SSL_METHOD *, TLSv1_client_method, DUMMYARG, DUMMYARG, return 0, return)
59
 #ifndef OPENSSL_NO_SSL2
60
 DEFINEFUNC(const SSL_METHOD *, SSLv2_server_method, DUMMYARG, DUMMYARG, return 0, return)
61
 #endif
62
 DEFINEFUNC(const SSL_METHOD *, SSLv3_server_method, DUMMYARG, DUMMYARG, return 0, return)
63
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
64
 DEFINEFUNC(const SSL_METHOD *, SSLv23_server_method, DUMMYARG, DUMMYARG, return 0, return)
65
+#else
66
+DEFINEFUNC(const SSL_METHOD *, TLS_server_method, DUMMYARG, DUMMYARG, return 0, return)
67
+#endif
68
 DEFINEFUNC(const SSL_METHOD *, TLSv1_server_method, DUMMYARG, DUMMYARG, return 0, return)
69
 #else
70
 DEFINEFUNC(SSL_METHOD *, SSLv2_client_method, DUMMYARG, DUMMYARG, return 0, return)
71
@@ -274,7 +295,11 @@ DEFINEFUNC2(int, X509_STORE_CTX_set_purp
72
 DEFINEFUNC(int, X509_STORE_CTX_get_error, X509_STORE_CTX *a, a, return -1, return)
73
 DEFINEFUNC(int, X509_STORE_CTX_get_error_depth, X509_STORE_CTX *a, a, return -1, return)
74
 DEFINEFUNC(X509 *, X509_STORE_CTX_get_current_cert, X509_STORE_CTX *a, a, return 0, return)
75
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
76
 DEFINEFUNC(STACK_OF(X509) *, X509_STORE_CTX_get_chain, X509_STORE_CTX *a, a, return 0, return)
77
+#else
78
+DEFINEFUNC(STACK_OF(X509) *, X509_STORE_CTX_get0_chain, X509_STORE_CTX *a, a, return 0, return)
79
+#endif
80
 DEFINEFUNC(X509_STORE_CTX *, X509_STORE_CTX_new, DUMMYARG, DUMMYARG, return 0, return)
81
 #ifdef SSLEAY_MACROS
82
 DEFINEFUNC2(int, i2d_DSAPrivateKey, const DSA *a, a, unsigned char **b, b, return -1, return)
83
@@ -282,10 +307,39 @@ DEFINEFUNC2(int, i2d_RSAPrivateKey, cons
84
 DEFINEFUNC3(RSA *, d2i_RSAPrivateKey, RSA **a, a, unsigned char **b, b, long c, c, return 0, return)
85
 DEFINEFUNC3(DSA *, d2i_DSAPrivateKey, DSA **a, a, unsigned char **b, b, long c, c, return 0, return)
86
 #endif
87
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
88
 DEFINEFUNC(void, OPENSSL_add_all_algorithms_noconf, void, DUMMYARG, return, DUMMYARG)
89
 DEFINEFUNC(void, OPENSSL_add_all_algorithms_conf, void, DUMMYARG, return, DUMMYARG)
90
+#else
91
+DEFINEFUNC2(int, OPENSSL_init_crypto, uint64_t opts, opts, void *settings, settings, return -1, return)
92
+#endif
93
 DEFINEFUNC3(int, SSL_CTX_load_verify_locations, SSL_CTX *ctx, ctx, const char *CAfile, CAfile, const char *CApath, CApath, return 0, return)
94
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
95
 DEFINEFUNC(long, SSLeay, void, DUMMYARG, return 0, return)
96
+#else
97
+DEFINEFUNC(unsigned long, OpenSSL_version_num, void, DUMMYARG, return 0, return)
98
+#endif
99
+DEFINEFUNC(X509_STORE *, SSL_CTX_get_cert_store, const SSL_CTX *ctx, ctx, return 0, return)
100
+
101
+DEFINEFUNC(ASN1_INTEGER *, X509_get_serialNumber, X509 *x, x, return 0, return)
102
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
103
+DEFINEFUNC(int, EVP_PKEY_id, const EVP_PKEY *pkey, pkey, return 0, return)
104
+DEFINEFUNC(int, EVP_PKEY_base_id, const EVP_PKEY *pkey, pkey, return 0, return)
105
+DEFINEFUNC2(int, SSL_CIPHER_get_bits, const SSL_CIPHER *cipher, cipher, int *alg_bits, alg_bits, return 0, return)
106
+DEFINEFUNC2(long, SSL_CTX_set_options, SSL_CTX *ctx, ctx, long options, options, return 0, return)
107
+DEFINEFUNC(long, X509_get_version, X509 *x, x, return 0, return)
108
+DEFINEFUNC(X509_PUBKEY *, X509_get_X509_PUBKEY, X509 *x, x, return 0, return)
109
+DEFINEFUNC(int, RSA_bits,  const RSA *rsa, rsa, return 0, return)
110
+DEFINEFUNC(int, DSA_security_bits, const DSA *dsa, dsa, return 0, return)
111
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
112
+DEFINEFUNC(ASN1_TIME *, X509_get_notAfter, X509 *x, x, return 0, return)
113
+DEFINEFUNC(ASN1_TIME *, X509_get_notBefore, X509 *x, x, return 0, return)
114
+#else
115
+DEFINEFUNC(ASN1_TIME *, X509_getm_notAfter, X509 *x, x, return 0, return)
116
+DEFINEFUNC(ASN1_TIME *, X509_getm_notBefore, X509 *x, x, return 0, return)
117
+#endif
118
+DEFINEFUNC4(void, DSA_get0_pqg, const DSA *d, d, BIGNUM **p, p, BIGNUM **q, q, BIGNUM **g, g, return, return)
119
+#endif
20
 
120
 
21
     // second attempt: find the development files libssl.so and libcrypto.so
121
 #ifdef Q_OS_SYMBIAN
22
-    libssl->setFileNameAndVersion(QLatin1String("ssl"), -1);
122
 #define RESOLVEFUNC(func, ordinal, lib) \
23
-    libcrypto->setFileNameAndVersion(QLatin1String("crypto"), -1);
123
@@ -580,7 +634,11 @@ bool q_resolveOpenSslSymbols()
24
+    libssl->setFileNameAndVersion(QLatin1String("%%OPENSSLLIB%%/libssl"), -1);
124
     static volatile bool symbolsResolved = false;
25
+    libcrypto->setFileNameAndVersion(QLatin1String("%%OPENSSLLIB%%/libcrypto"), -1);
125
     static volatile bool triedToResolveSymbols = false;
26
     if (libcrypto->load() && libssl->load()) {
126
 #ifndef QT_NO_THREAD
27
         // libssl.so.0 and libcrypto.so.0 found
127
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
28
         return pair;
128
     QMutexLocker locker(QMutexPool::globalInstanceGet((void *)&q_SSL_library_init));
129
+#else
130
+    QMutexLocker locker(QMutexPool::globalInstanceGet((void *)&q_OPENSSL_init_ssl));
131
+#endif
132
 #endif
133
     if (symbolsResolved)
134
         return true;
135
@@ -614,9 +672,11 @@ bool q_resolveOpenSslSymbols()
136
     RESOLVEFUNC(BIO_write, 269, libs.second )
137
     RESOLVEFUNC(BN_num_bits, 387, libs.second )
138
     RESOLVEFUNC(CRYPTO_free, 469, libs.second )
139
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
140
     RESOLVEFUNC(CRYPTO_num_locks, 500, libs.second )
141
     RESOLVEFUNC(CRYPTO_set_id_callback, 513, libs.second )
142
     RESOLVEFUNC(CRYPTO_set_locking_callback, 516, libs.second )
143
+#endif
144
     RESOLVEFUNC(DSA_free, 594, libs.second )
145
     RESOLVEFUNC(ERR_error_string, 744, libs.second )
146
     RESOLVEFUNC(ERR_get_error, 749, libs.second )
147
@@ -674,8 +734,10 @@ bool q_resolveOpenSslSymbols()
148
     RESOLVEFUNC(SSL_get_peer_cert_chain, 117, libs.first )
149
     RESOLVEFUNC(SSL_get_peer_certificate, 118, libs.first )
150
     RESOLVEFUNC(SSL_get_verify_result, 132, libs.first )
151
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
152
     RESOLVEFUNC(SSL_library_init, 137, libs.first )
153
     RESOLVEFUNC(SSL_load_error_strings, 139, libs.first )
154
+#endif
155
     RESOLVEFUNC(SSL_new, 140, libs.first )
156
 #if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT)
157
     RESOLVEFUNC(SSL_ctrl, 95, libs.first )
158
@@ -747,9 +809,11 @@ bool q_resolveOpenSslSymbols()
159
     RESOLVEFUNC(BIO_write)
160
     RESOLVEFUNC(BN_num_bits)
161
     RESOLVEFUNC(CRYPTO_free)
162
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
163
     RESOLVEFUNC(CRYPTO_num_locks)
164
     RESOLVEFUNC(CRYPTO_set_id_callback)
165
     RESOLVEFUNC(CRYPTO_set_locking_callback)
166
+#endif
167
     RESOLVEFUNC(DSA_free)
168
     RESOLVEFUNC(ERR_error_string)
169
     RESOLVEFUNC(ERR_get_error)
170
@@ -779,10 +843,17 @@ bool q_resolveOpenSslSymbols()
171
     RESOLVEFUNC(RAND_seed)
172
     RESOLVEFUNC(RAND_status)
173
     RESOLVEFUNC(RSA_free)
174
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
175
     RESOLVEFUNC(sk_free)
176
     RESOLVEFUNC(sk_num)
177
     RESOLVEFUNC(sk_pop_free)
178
     RESOLVEFUNC(sk_value)
179
+#else
180
+    RESOLVEFUNC(OPENSSL_sk_free)
181
+    RESOLVEFUNC(OPENSSL_sk_num)
182
+    RESOLVEFUNC(OPENSSL_sk_pop_free)
183
+    RESOLVEFUNC(OPENSSL_sk_value)
184
+#endif
185
     RESOLVEFUNC(SSL_CIPHER_description)
186
     RESOLVEFUNC(SSL_CTX_check_private_key)
187
     RESOLVEFUNC(SSL_CTX_ctrl)
188
@@ -797,6 +868,7 @@ bool q_resolveOpenSslSymbols()
189
     RESOLVEFUNC(SSL_CTX_use_PrivateKey)
190
     RESOLVEFUNC(SSL_CTX_use_RSAPrivateKey)
191
     RESOLVEFUNC(SSL_CTX_use_PrivateKey_file)
192
+    RESOLVEFUNC(SSL_CTX_get_cert_store)
193
     RESOLVEFUNC(SSL_accept)
194
     RESOLVEFUNC(SSL_clear)
195
     RESOLVEFUNC(SSL_connect)
196
@@ -807,8 +879,12 @@ bool q_resolveOpenSslSymbols()
197
     RESOLVEFUNC(SSL_get_peer_cert_chain)
198
     RESOLVEFUNC(SSL_get_peer_certificate)
199
     RESOLVEFUNC(SSL_get_verify_result)
200
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
201
     RESOLVEFUNC(SSL_library_init)
202
     RESOLVEFUNC(SSL_load_error_strings)
203
+#else
204
+    RESOLVEFUNC(OPENSSL_init_ssl)
205
+#endif
206
     RESOLVEFUNC(SSL_new)
207
 #if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT)
208
     RESOLVEFUNC(SSL_ctrl)
209
@@ -819,17 +895,47 @@ bool q_resolveOpenSslSymbols()
210
     RESOLVEFUNC(SSL_set_connect_state)
211
     RESOLVEFUNC(SSL_shutdown)
212
     RESOLVEFUNC(SSL_write)
213
+
214
+    RESOLVEFUNC(X509_get_serialNumber)
215
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
216
+    RESOLVEFUNC(SSL_CTX_ctrl)
217
+    RESOLVEFUNC(EVP_PKEY_id)
218
+    RESOLVEFUNC(EVP_PKEY_base_id)
219
+    RESOLVEFUNC(SSL_CIPHER_get_bits)
220
+    RESOLVEFUNC(SSL_CTX_set_options)
221
+    RESOLVEFUNC(X509_get_version)
222
+    RESOLVEFUNC(X509_get_X509_PUBKEY)
223
+    RESOLVEFUNC(RSA_bits)
224
+    RESOLVEFUNC(DSA_security_bits)
225
+    RESOLVEFUNC(DSA_get0_pqg)
226
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
227
+    RESOLVEFUNC(X509_get_notAfter)
228
+    RESOLVEFUNC(X509_get_notBefore)
229
+#else
230
+    RESOLVEFUNC(X509_getm_notAfter)
231
+    RESOLVEFUNC(X509_getm_notBefore)
232
+#endif
233
+#endif
234
+
235
 #ifndef OPENSSL_NO_SSL2
236
     RESOLVEFUNC(SSLv2_client_method)
237
 #endif
238
     RESOLVEFUNC(SSLv3_client_method)
239
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
240
     RESOLVEFUNC(SSLv23_client_method)
241
+#else
242
+    RESOLVEFUNC(TLS_client_method)
243
+#endif
244
     RESOLVEFUNC(TLSv1_client_method)
245
 #ifndef OPENSSL_NO_SSL2
246
     RESOLVEFUNC(SSLv2_server_method)
247
 #endif
248
     RESOLVEFUNC(SSLv3_server_method)
249
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
250
     RESOLVEFUNC(SSLv23_server_method)
251
+#else
252
+    RESOLVEFUNC(TLS_server_method)
253
+#endif
254
     RESOLVEFUNC(TLSv1_server_method)
255
     RESOLVEFUNC(X509_NAME_entry_count)
256
     RESOLVEFUNC(X509_NAME_get_entry)
257
@@ -846,7 +952,11 @@ bool q_resolveOpenSslSymbols()
258
     RESOLVEFUNC(X509_STORE_CTX_get_error)
259
     RESOLVEFUNC(X509_STORE_CTX_get_error_depth)
260
     RESOLVEFUNC(X509_STORE_CTX_get_current_cert)
261
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
262
     RESOLVEFUNC(X509_STORE_CTX_get_chain)
263
+#else
264
+    RESOLVEFUNC(X509_STORE_CTX_get0_chain)
265
+#endif
266
     RESOLVEFUNC(X509_cmp)
267
 #ifndef SSLEAY_MACROS
268
     RESOLVEFUNC(X509_dup)
269
@@ -867,10 +977,18 @@ bool q_resolveOpenSslSymbols()
270
     RESOLVEFUNC(d2i_DSAPrivateKey)
271
     RESOLVEFUNC(d2i_RSAPrivateKey)
272
 #endif
273
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
274
     RESOLVEFUNC(OPENSSL_add_all_algorithms_noconf)
275
     RESOLVEFUNC(OPENSSL_add_all_algorithms_conf)
276
+#else
277
+    RESOLVEFUNC(OPENSSL_init_crypto)
278
+#endif
279
     RESOLVEFUNC(SSL_CTX_load_verify_locations)
280
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
281
     RESOLVEFUNC(SSLeay)
282
+#else
283
+    RESOLVEFUNC(OpenSSL_version_num)
284
+#endif
285
 #endif // Q_OS_SYMBIAN
286
     symbolsResolved = true;
287
     delete libs.first;

Return to bug 232970