QtBase  v6.3.1
qsslsocket_openssl_symbols.cpp
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2017 The Qt Company Ltd.
4 ** Copyright (C) 2014 BlackBerry Limited. All rights reserved.
5 ** Copyright (C) 2016 Richard J. Moore <rich@kde.org>
6 ** Contact: https://www.qt.io/licensing/
7 **
8 ** This file is part of the QtNetwork module of the Qt Toolkit.
9 **
10 ** $QT_BEGIN_LICENSE:LGPL$
11 ** Commercial License Usage
12 ** Licensees holding valid commercial Qt licenses may use this file in
13 ** accordance with the commercial license agreement provided with the
14 ** Software or, alternatively, in accordance with the terms contained in
15 ** a written agreement between you and The Qt Company. For licensing terms
16 ** and conditions see https://www.qt.io/terms-conditions. For further
17 ** information use the contact form at https://www.qt.io/contact-us.
18 **
19 ** GNU Lesser General Public License Usage
20 ** Alternatively, this file may be used under the terms of the GNU Lesser
21 ** General Public License version 3 as published by the Free Software
22 ** Foundation and appearing in the file LICENSE.LGPL3 included in the
23 ** packaging of this file. Please review the following information to
24 ** ensure the GNU Lesser General Public License version 3 requirements
25 ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
26 **
27 ** GNU General Public License Usage
28 ** Alternatively, this file may be used under the terms of the GNU
29 ** General Public License version 2.0 or (at your option) the GNU General
30 ** Public license version 3 or any later version approved by the KDE Free
31 ** Qt Foundation. The licenses are as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
33 ** included in the packaging of this file. Please review the following
34 ** information to ensure the GNU General Public License requirements will
35 ** be met: https://www.gnu.org/licenses/gpl-2.0.html and
36 ** https://www.gnu.org/licenses/gpl-3.0.html.
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 /****************************************************************************
43 **
44 ** In addition, as a special exception, the copyright holders listed above give
45 ** permission to link the code of its release of Qt with the OpenSSL project's
46 ** "OpenSSL" library (or modified versions of the "OpenSSL" library that use the
47 ** same license as the original version), and distribute the linked executables.
48 **
49 ** You must comply with the GNU General Public License version 2 in all
50 ** respects for all of the code used other than the "OpenSSL" code. If you
51 ** modify this file, you may extend this exception to your version of the file,
52 ** but you are not obligated to do so. If you do not wish to do so, delete
53 ** this exception statement from your version of this file.
54 **
55 ****************************************************************************/
56 
58 #include "qtlsbackend_openssl_p.h"
59 
60 #include <QtNetwork/private/qssl_p.h>
61 
62 #ifdef Q_OS_WIN
63 # include <QtCore/private/qsystemlibrary_p.h>
64 #elif QT_CONFIG(library)
65 # include <QtCore/qlibrary.h>
66 #endif
67 #include <QtCore/qmutex.h>
68 #include <QtCore/qdatetime.h>
69 #if defined(Q_OS_UNIX)
70 #include <QtCore/qdir.h>
71 #endif
72 #include <QtCore/private/qduplicatetracker_p.h>
73 #if defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)
74 #include <link.h>
75 #endif
76 #ifdef Q_OS_DARWIN
77 #include <QtCore/private/qcore_mac_p.h>
78 #endif
79 
80 #include <algorithm>
81 
83 
84 /*
85  Note to maintainer:
86  -------------------
87 
88  We load OpenSSL symbols dynamically. Because symbols are known to
89  disappear, and signatures sometimes change, between releases, we need to
90  be careful about how this is done. To ensure we don't end up dereferencing
91  null function pointers, and continue running even if certain functions are
92  missing, we define helper functions for each of the symbols we load from
93  OpenSSL, all prefixed with "q_" (declared in
94  qsslsocket_openssl_symbols_p.h). So instead of calling SSL_connect
95  directly, we call q_SSL_connect, which is a function that checks if the
96  actual SSL_connect fptr is null, and returns a failure if it is, or calls
97  SSL_connect if it isn't.
98 
99  This requires a somewhat tedious process of declaring each function we
100  want to call in OpenSSL thrice: once with the q_, in _p.h, once using the
101  DEFINEFUNC macros below, and once in the function that actually resolves
102  the symbols, below the DEFINEFUNC declarations below.
103 
104  There's one DEFINEFUNC macro declared for every number of arguments
105  exposed by OpenSSL (feel free to extend when needed). The easiest thing to
106  do is to find an existing entry that matches the arg count of the function
107  you want to import, and do the same.
108 
109  The first macro arg is the function return type. The second is the
110  verbatim name of the function/symbol. Then follows a list of N pairs of
111  argument types with a variable name, and just the variable name (char *a,
112  a, char *b, b, etc). Finally there's two arguments - a suitable return
113  statement for the error case (for an int function, return 0 or return -1
114  is usually right). Then either just "return" or DUMMYARG, the latter being
115  for void functions.
116 
117  Note: Take into account that these macros and declarations are processed
118  at compile-time, and the result depends on the OpenSSL headers the
119  compiling host has installed, but the symbols are resolved at run-time,
120  possibly with a different version of OpenSSL.
121 */
122 
123 #ifndef QT_LINKED_OPENSSL
124 
125 namespace {
126 void qsslSocketUnresolvedSymbolWarning(const char *functionName)
127 {
128  qCWarning(lcTlsBackend, "QSslSocket: cannot call unresolved function %s", functionName);
129 }
130 
131 #if QT_CONFIG(library)
132 void qsslSocketCannotResolveSymbolWarning(const char *functionName)
133 {
134  qCWarning(lcTlsBackend, "QSslSocket: cannot resolve %s", functionName);
135 }
136 #endif
137 
138 }
139 
140 #endif // QT_LINKED_OPENSSL
141 
142 DEFINEFUNC(const unsigned char *, ASN1_STRING_get0_data, const ASN1_STRING *a, a, return nullptr, return)
143 DEFINEFUNC2(int, OPENSSL_init_ssl, uint64_t opts, opts, const OPENSSL_INIT_SETTINGS *settings, settings, return 0, return)
144 DEFINEFUNC2(int, OPENSSL_init_crypto, uint64_t opts, opts, const OPENSSL_INIT_SETTINGS *settings, settings, return 0, return)
145 DEFINEFUNC(BIO *, BIO_new, const BIO_METHOD *a, a, return nullptr, return)
146 DEFINEFUNC(const BIO_METHOD *, BIO_s_mem, void, DUMMYARG, return nullptr, return)
147 DEFINEFUNC2(int, BN_is_word, BIGNUM *a, a, BN_ULONG w, w, return 0, return)
148 DEFINEFUNC(int, EVP_CIPHER_CTX_reset, EVP_CIPHER_CTX *c, c, return 0, return)
149 DEFINEFUNC(int, EVP_PKEY_up_ref, EVP_PKEY *a, a, return 0, return)
150 DEFINEFUNC2(EVP_PKEY_CTX *, EVP_PKEY_CTX_new, EVP_PKEY *pkey, pkey, ENGINE *e, e, return nullptr, return)
151 DEFINEFUNC(int, EVP_PKEY_param_check, EVP_PKEY_CTX *ctx, ctx, return 0, return)
152 DEFINEFUNC(void, EVP_PKEY_CTX_free, EVP_PKEY_CTX *ctx, ctx, return, return)
153 DEFINEFUNC(int, OPENSSL_sk_num, OPENSSL_STACK *a, a, return -1, return)
154 DEFINEFUNC2(void, OPENSSL_sk_pop_free, OPENSSL_STACK *a, a, void (*b)(void*), b, return, DUMMYARG)
155 DEFINEFUNC(OPENSSL_STACK *, OPENSSL_sk_new_null, DUMMYARG, DUMMYARG, return nullptr, return)
156 DEFINEFUNC2(void, OPENSSL_sk_push, OPENSSL_STACK *a, a, void *b, b, return, DUMMYARG)
157 DEFINEFUNC(void, OPENSSL_sk_free, OPENSSL_STACK *a, a, return, DUMMYARG)
158 DEFINEFUNC2(void *, OPENSSL_sk_value, OPENSSL_STACK *a, a, int b, b, return nullptr, return)
159 DEFINEFUNC(int, SSL_session_reused, SSL *a, a, return 0, return)
160 DEFINEFUNC2(unsigned long, SSL_CTX_set_options, SSL_CTX *ctx, ctx, unsigned long op, op, return 0, return)
161 using info_callback = void (*) (const SSL *ssl, int type, int val);
162 DEFINEFUNC2(void, SSL_set_info_callback, SSL *ssl, ssl, info_callback cb, cb, return, return)
163 DEFINEFUNC(const char *, SSL_alert_type_string, int value, value, return nullptr, return)
164 DEFINEFUNC(const char *, SSL_alert_desc_string_long, int value, value, return nullptr, return)
165 DEFINEFUNC(int, SSL_CTX_get_security_level, const SSL_CTX *ctx, ctx, return -1, return)
166 DEFINEFUNC2(void, SSL_CTX_set_security_level, SSL_CTX *ctx, ctx, int level, level, return, return)
167 #ifdef TLS1_3_VERSION
168 DEFINEFUNC2(int, SSL_CTX_set_ciphersuites, SSL_CTX *ctx, ctx, const char *str, str, return 0, return)
169 DEFINEFUNC2(void, SSL_set_psk_use_session_callback, SSL *ssl, ssl, q_SSL_psk_use_session_cb_func_t callback, callback, return, DUMMYARG)
170 DEFINEFUNC2(void, SSL_CTX_sess_set_new_cb, SSL_CTX *ctx, ctx, NewSessionCallback cb, cb, return, return)
171 DEFINEFUNC(int, SSL_SESSION_is_resumable, const SSL_SESSION *s, s, return 0, return)
172 #endif
173 DEFINEFUNC3(size_t, SSL_get_client_random, SSL *a, a, unsigned char *out, out, size_t outlen, outlen, return 0, return)
174 DEFINEFUNC3(size_t, SSL_SESSION_get_master_key, const SSL_SESSION *ses, ses, unsigned char *out, out, size_t outlen, outlen, return 0, return)
175 DEFINEFUNC6(int, CRYPTO_get_ex_new_index, int class_index, class_index, long argl, argl, void *argp, argp, CRYPTO_EX_new *new_func, new_func, CRYPTO_EX_dup *dup_func, dup_func, CRYPTO_EX_free *free_func, free_func, return -1, return)
176 DEFINEFUNC2(unsigned long, SSL_set_options, SSL *ssl, ssl, unsigned long op, op, return 0, return)
177 
178 DEFINEFUNC(const SSL_METHOD *, TLS_method, DUMMYARG, DUMMYARG, return nullptr, return)
179 DEFINEFUNC(const SSL_METHOD *, TLS_client_method, DUMMYARG, DUMMYARG, return nullptr, return)
180 DEFINEFUNC(const SSL_METHOD *, TLS_server_method, DUMMYARG, DUMMYARG, return nullptr, return)
181 DEFINEFUNC(void, X509_up_ref, X509 *a, a, return, DUMMYARG)
182 DEFINEFUNC(ASN1_TIME *, X509_getm_notBefore, X509 *a, a, return nullptr, return)
183 DEFINEFUNC(ASN1_TIME *, X509_getm_notAfter, X509 *a, a, return nullptr, return)
184 DEFINEFUNC2(void, ASN1_item_free, ASN1_VALUE *val, val, const ASN1_ITEM *it, it, return, return)
185 DEFINEFUNC(void, X509V3_conf_free, CONF_VALUE *val, val, return, return)
186 DEFINEFUNC(long, X509_get_version, X509 *a, a, return -1, return)
187 DEFINEFUNC(EVP_PKEY *, X509_get_pubkey, X509 *a, a, return nullptr, return)
188 DEFINEFUNC2(void, X509_STORE_set_verify_cb, X509_STORE *a, a, X509_STORE_CTX_verify_cb verify_cb, verify_cb, return, DUMMYARG)
189 DEFINEFUNC3(int, X509_STORE_set_ex_data, X509_STORE *a, a, int idx, idx, void *data, data, return 0, return)
190 DEFINEFUNC2(void *, X509_STORE_get_ex_data, X509_STORE *r, r, int idx, idx, return nullptr, return)
191 DEFINEFUNC(STACK_OF(X509) *, X509_STORE_CTX_get0_chain, X509_STORE_CTX *a, a, return nullptr, return)
192 DEFINEFUNC3(void, CRYPTO_free, void *str, str, const char *file, file, int line, line, return, DUMMYARG)
193 DEFINEFUNC(long, OpenSSL_version_num, void, DUMMYARG, return 0, return)
194 DEFINEFUNC(const char *, OpenSSL_version, int a, a, return nullptr, return)
195 DEFINEFUNC(unsigned long, SSL_SESSION_get_ticket_lifetime_hint, const SSL_SESSION *session, session, return 0, return)
196 DEFINEFUNC4(void, DH_get0_pqg, const DH *dh, dh, const BIGNUM **p, p, const BIGNUM **q, q, const BIGNUM **g, g, return, DUMMYARG)
197 
198 #if QT_CONFIG(dtls)
199 DEFINEFUNC2(int, DTLSv1_listen, SSL *s, s, BIO_ADDR *c, c, return -1, return)
200 DEFINEFUNC(BIO_ADDR *, BIO_ADDR_new, DUMMYARG, DUMMYARG, return nullptr, return)
201 DEFINEFUNC(void, BIO_ADDR_free, BIO_ADDR *ap, ap, return, DUMMYARG)
202 DEFINEFUNC2(BIO_METHOD *, BIO_meth_new, int type, type, const char *name, name, return nullptr, return)
203 DEFINEFUNC(void, BIO_meth_free, BIO_METHOD *biom, biom, return, DUMMYARG)
204 DEFINEFUNC2(int, BIO_meth_set_write, BIO_METHOD *biom, biom, DgramWriteCallback write, write, return 0, return)
205 DEFINEFUNC2(int, BIO_meth_set_read, BIO_METHOD *biom, biom, DgramReadCallback read, read, return 0, return)
206 DEFINEFUNC2(int, BIO_meth_set_puts, BIO_METHOD *biom, biom, DgramPutsCallback puts, puts, return 0, return)
207 DEFINEFUNC2(int, BIO_meth_set_ctrl, BIO_METHOD *biom, biom, DgramCtrlCallback ctrl, ctrl, return 0, return)
208 DEFINEFUNC2(int, BIO_meth_set_create, BIO_METHOD *biom, biom, DgramCreateCallback crt, crt, return 0, return)
209 DEFINEFUNC2(int, BIO_meth_set_destroy, BIO_METHOD *biom, biom, DgramDestroyCallback dtr, dtr, return 0, return)
210 #endif // dtls
211 
212 #if QT_CONFIG(ocsp)
213 DEFINEFUNC(const OCSP_CERTID *, OCSP_SINGLERESP_get0_id, const OCSP_SINGLERESP *x, x, return nullptr, return)
214 DEFINEFUNC3(OCSP_RESPONSE *, d2i_OCSP_RESPONSE, OCSP_RESPONSE **a, a, const unsigned char **in, in, long len, len, return nullptr, return)
215 DEFINEFUNC(void, OCSP_RESPONSE_free, OCSP_RESPONSE *rs, rs, return, DUMMYARG)
216 DEFINEFUNC(OCSP_BASICRESP *, OCSP_response_get1_basic, OCSP_RESPONSE *resp, resp, return nullptr, return)
217 DEFINEFUNC(void, OCSP_BASICRESP_free, OCSP_BASICRESP *bs, bs, return, DUMMYARG)
218 DEFINEFUNC(int, OCSP_response_status, OCSP_RESPONSE *resp, resp, return OCSP_RESPONSE_STATUS_INTERNALERROR, return)
219 DEFINEFUNC4(int, OCSP_basic_verify, OCSP_BASICRESP *bs, bs, STACK_OF(X509) *certs, certs, X509_STORE *st, st, unsigned long flags, flags, return -1, return)
220 DEFINEFUNC(int, OCSP_resp_count, OCSP_BASICRESP *bs, bs, return 0, return)
221 DEFINEFUNC2(OCSP_SINGLERESP *, OCSP_resp_get0, OCSP_BASICRESP *bs, bs, int idx, idx, return nullptr, return)
222 DEFINEFUNC5(int, OCSP_single_get0_status, OCSP_SINGLERESP *single, single, int *reason, reason, ASN1_GENERALIZEDTIME **revtime, revtime,
223  ASN1_GENERALIZEDTIME **thisupd, thisupd, ASN1_GENERALIZEDTIME **nextupd, nextupd, return -1, return)
224 DEFINEFUNC4(int, OCSP_check_validity, ASN1_GENERALIZEDTIME *thisupd, thisupd, ASN1_GENERALIZEDTIME *nextupd, nextupd, long nsec, nsec, long maxsec, maxsec, return 0, return)
225 DEFINEFUNC3(OCSP_CERTID *, OCSP_cert_to_id, const EVP_MD *dgst, dgst, X509 *subject, subject, X509 *issuer, issuer, return nullptr, return)
226 DEFINEFUNC(void, OCSP_CERTID_free, OCSP_CERTID *cid, cid, return, DUMMYARG)
227 DEFINEFUNC5(int, OCSP_id_get0_info, ASN1_OCTET_STRING **piNameHash, piNameHash, ASN1_OBJECT **pmd, pmd,
228  ASN1_OCTET_STRING **piKeyHash, piKeyHash, ASN1_INTEGER **pserial, pserial, OCSP_CERTID *cid, cid,
229  return 0, return)
230 DEFINEFUNC2(OCSP_RESPONSE *, OCSP_response_create, int status, status, OCSP_BASICRESP *bs, bs, return nullptr, return)
231 DEFINEFUNC(const STACK_OF(X509) *, OCSP_resp_get0_certs, const OCSP_BASICRESP *bs, bs, return nullptr, return)
232 DEFINEFUNC2(int, OCSP_id_cmp, OCSP_CERTID *a, a, OCSP_CERTID *b, b, return -1, return)
233 DEFINEFUNC7(OCSP_SINGLERESP *, OCSP_basic_add1_status, OCSP_BASICRESP *r, r, OCSP_CERTID *c, c, int s, s,
234  int re, re, ASN1_TIME *rt, rt, ASN1_TIME *t, t, ASN1_TIME *n, n, return nullptr, return)
235 DEFINEFUNC(OCSP_BASICRESP *, OCSP_BASICRESP_new, DUMMYARG, DUMMYARG, return nullptr, return)
236 DEFINEFUNC2(int, i2d_OCSP_RESPONSE, OCSP_RESPONSE *r, r, unsigned char **ppout, ppout, return 0, return)
237 DEFINEFUNC6(int, OCSP_basic_sign, OCSP_BASICRESP *br, br, X509 *signer, signer, EVP_PKEY *key, key,
238  const EVP_MD *dg, dg, STACK_OF(X509) *cs, cs, unsigned long flags, flags, return 0, return)
239 #endif // ocsp
240 
241 DEFINEFUNC(void, AUTHORITY_INFO_ACCESS_free, AUTHORITY_INFO_ACCESS *p, p, return, return)
242 DEFINEFUNC2(void, BIO_set_data, BIO *a, a, void *ptr, ptr, return, DUMMYARG)
243 DEFINEFUNC(void *, BIO_get_data, BIO *a, a, return nullptr, return)
244 DEFINEFUNC2(void, BIO_set_init, BIO *a, a, int init, init, return, DUMMYARG)
245 DEFINEFUNC(int, BIO_get_shutdown, BIO *a, a, return -1, return)
246 DEFINEFUNC2(void, BIO_set_shutdown, BIO *a, a, int shut, shut, return, DUMMYARG)
247 
248 DEFINEFUNC(long, ASN1_INTEGER_get, ASN1_INTEGER *a, a, return 0, return)
249 DEFINEFUNC2(int, ASN1_INTEGER_cmp, const ASN1_INTEGER *a, a, const ASN1_INTEGER *b, b, return 1, return)
250 DEFINEFUNC(int, ASN1_STRING_length, ASN1_STRING *a, a, return 0, return)
251 DEFINEFUNC2(int, ASN1_STRING_to_UTF8, unsigned char **a, a, ASN1_STRING *b, b, return 0, return)
252 DEFINEFUNC2(int, ASN1_TIME_to_tm, const ASN1_TIME *s, s, struct tm *tm, tm, return 0, return)
253 DEFINEFUNC4(long, BIO_ctrl, BIO *a, a, int b, b, long c, c, void *d, d, return -1, return)
254 DEFINEFUNC(int, BIO_free, BIO *a, a, return 0, return)
255 DEFINEFUNC2(BIO *, BIO_new_mem_buf, void *a, a, int b, b, return nullptr, return)
256 DEFINEFUNC3(int, BIO_read, BIO *a, a, void *b, b, int c, c, return -1, return)
257 
258 DEFINEFUNC3(int, BIO_write, BIO *a, a, const void *b, b, int c, c, return -1, return)
259 DEFINEFUNC(int, BN_num_bits, const BIGNUM *a, a, return 0, return)
260 DEFINEFUNC2(BN_ULONG, BN_mod_word, const BIGNUM *a, a, BN_ULONG w, w, return static_cast<BN_ULONG>(-1), return)
261 DEFINEFUNC3(X509 *, d2i_X509, X509 **a, a, const unsigned char **b, b, long c, c, return nullptr, return)
262 DEFINEFUNC2(char *, ERR_error_string, unsigned long a, a, char *b, b, return nullptr, return)
263 DEFINEFUNC3(void, ERR_error_string_n, unsigned long e, e, char *b, b, size_t len, len, return, DUMMYARG)
264 DEFINEFUNC(unsigned long, ERR_get_error, DUMMYARG, DUMMYARG, return 0, return)
265 DEFINEFUNC(EVP_CIPHER_CTX *, EVP_CIPHER_CTX_new, void, DUMMYARG, return nullptr, return)
266 DEFINEFUNC(void, EVP_CIPHER_CTX_free, EVP_CIPHER_CTX *a, a, return, DUMMYARG)
267 DEFINEFUNC4(int, EVP_CIPHER_CTX_ctrl, EVP_CIPHER_CTX *ctx, ctx, int type, type, int arg, arg, void *ptr, ptr, return 0, return)
268 DEFINEFUNC2(int, EVP_CIPHER_CTX_set_key_length, EVP_CIPHER_CTX *ctx, ctx, int keylen, keylen, return 0, return)
269 DEFINEFUNC5(int, EVP_CipherInit, EVP_CIPHER_CTX *ctx, ctx, const EVP_CIPHER *type, type, const unsigned char *key, key, const unsigned char *iv, iv, int enc, enc, return 0, return)
270 DEFINEFUNC6(int, EVP_CipherInit_ex, EVP_CIPHER_CTX *ctx, ctx, const EVP_CIPHER *cipher, cipher, ENGINE *impl, impl, const unsigned char *key, key, const unsigned char *iv, iv, int enc, enc, return 0, return)
271 DEFINEFUNC5(int, EVP_CipherUpdate, EVP_CIPHER_CTX *ctx, ctx, unsigned char *out, out, int *outl, outl, const unsigned char *in, in, int inl, inl, return 0, return)
272 DEFINEFUNC3(int, EVP_CipherFinal, EVP_CIPHER_CTX *ctx, ctx, unsigned char *out, out, int *outl, outl, return 0, return)
273 DEFINEFUNC(const EVP_MD *, EVP_get_digestbyname, const char *name, name, return nullptr, return)
274 #ifndef OPENSSL_NO_DES
275 DEFINEFUNC(const EVP_CIPHER *, EVP_des_cbc, DUMMYARG, DUMMYARG, return nullptr, return)
276 DEFINEFUNC(const EVP_CIPHER *, EVP_des_ede3_cbc, DUMMYARG, DUMMYARG, return nullptr, return)
277 #endif
278 #ifndef OPENSSL_NO_RC2
279 DEFINEFUNC(const EVP_CIPHER *, EVP_rc2_cbc, DUMMYARG, DUMMYARG, return nullptr, return)
280 #endif
281 #ifndef OPENSSL_NO_AES
282 DEFINEFUNC(const EVP_CIPHER *, EVP_aes_128_cbc, DUMMYARG, DUMMYARG, return nullptr, return)
283 DEFINEFUNC(const EVP_CIPHER *, EVP_aes_192_cbc, DUMMYARG, DUMMYARG, return nullptr, return)
284 DEFINEFUNC(const EVP_CIPHER *, EVP_aes_256_cbc, DUMMYARG, DUMMYARG, return nullptr, return)
285 #endif
286 DEFINEFUNC(const EVP_MD *, EVP_sha1, DUMMYARG, DUMMYARG, return nullptr, return)
287 DEFINEFUNC(void, EVP_PKEY_free, EVP_PKEY *a, a, return, DUMMYARG)
288 DEFINEFUNC(EVP_PKEY *, EVP_PKEY_new, DUMMYARG, DUMMYARG, return nullptr, return)
289 DEFINEFUNC(int, EVP_PKEY_type, int a, a, return NID_undef, return)
290 DEFINEFUNC2(int, i2d_X509, X509 *a, a, unsigned char **b, b, return -1, return)
291 DEFINEFUNC(const char *, OBJ_nid2sn, int a, a, return nullptr, return)
292 DEFINEFUNC(const char *, OBJ_nid2ln, int a, a, return nullptr, return)
293 DEFINEFUNC(int, OBJ_sn2nid, const char *s, s, return 0, return)
294 DEFINEFUNC(int, OBJ_ln2nid, const char *s, s, return 0, return)
295 DEFINEFUNC3(int, i2t_ASN1_OBJECT, char *a, a, int b, b, ASN1_OBJECT *c, c, return -1, return)
296 DEFINEFUNC4(int, OBJ_obj2txt, char *a, a, int b, b, ASN1_OBJECT *c, c, int d, d, return -1, return)
297 DEFINEFUNC(int, OBJ_obj2nid, const ASN1_OBJECT *a, a, return NID_undef, return)
298 DEFINEFUNC4(EVP_PKEY *, PEM_read_bio_PrivateKey, BIO *a, a, EVP_PKEY **b, b, pem_password_cb *c, c, void *d, d, return nullptr, return)
299 
300 DEFINEFUNC4(DH *, PEM_read_bio_DHparams, BIO *a, a, DH **b, b, pem_password_cb *c, c, void *d, d, return nullptr, return)
301 DEFINEFUNC7(int, PEM_write_bio_PrivateKey, BIO *a, a, EVP_PKEY *b, b, const EVP_CIPHER *c, c, unsigned char *d, d, int e, e, pem_password_cb *f, f, void *g, g, return 0, return)
302 DEFINEFUNC7(int, PEM_write_bio_PrivateKey_traditional, BIO *a, a, EVP_PKEY *b, b, const EVP_CIPHER *c, c, unsigned char *d, d, int e, e, pem_password_cb *f, f, void *g, g, return 0, return)
303 DEFINEFUNC4(EVP_PKEY *, PEM_read_bio_PUBKEY, BIO *a, a, EVP_PKEY **b, b, pem_password_cb *c, c, void *d, d, return nullptr, return)
304 DEFINEFUNC2(int, PEM_write_bio_PUBKEY, BIO *a, a, EVP_PKEY *b, b, return 0, return)
305 DEFINEFUNC2(void, RAND_seed, const void *a, a, int b, b, return, DUMMYARG)
306 DEFINEFUNC(int, RAND_status, void, DUMMYARG, return -1, return)
307 DEFINEFUNC2(int, RAND_bytes, unsigned char *b, b, int n, n, return 0, return)
308 DEFINEFUNC(int, SSL_accept, SSL *a, a, return -1, return)
309 DEFINEFUNC(int, SSL_clear, SSL *a, a, return -1, return)
310 DEFINEFUNC3(char *, SSL_CIPHER_description, const SSL_CIPHER *a, a, char *b, b, int c, c, return nullptr, return)
311 DEFINEFUNC2(int, SSL_CIPHER_get_bits, const SSL_CIPHER *a, a, int *b, b, return 0, return)
312 DEFINEFUNC(BIO *, SSL_get_rbio, const SSL *s, s, return nullptr, return)
313 DEFINEFUNC(int, SSL_connect, SSL *a, a, return -1, return)
314 DEFINEFUNC(int, SSL_CTX_check_private_key, const SSL_CTX *a, a, return -1, return)
315 DEFINEFUNC4(long, SSL_CTX_ctrl, SSL_CTX *a, a, int b, b, long c, c, void *d, d, return -1, return)
316 DEFINEFUNC(void, SSL_CTX_free, SSL_CTX *a, a, return, DUMMYARG)
317 DEFINEFUNC(SSL_CTX *, SSL_CTX_new, const SSL_METHOD *a, a, return nullptr, return)
318 DEFINEFUNC2(int, SSL_CTX_set_cipher_list, SSL_CTX *a, a, const char *b, b, return -1, return)
319 DEFINEFUNC3(long, SSL_CTX_callback_ctrl, SSL_CTX *ctx, ctx, int dst, dst, GenericCallbackType cb, cb, return 0, return)
320 DEFINEFUNC(int, SSL_CTX_set_default_verify_paths, SSL_CTX *a, a, return -1, return)
321 DEFINEFUNC3(void, SSL_CTX_set_verify, SSL_CTX *a, a, int b, b, int (*c)(int, X509_STORE_CTX *), c, return, DUMMYARG)
322 DEFINEFUNC2(void, SSL_CTX_set_verify_depth, SSL_CTX *a, a, int b, b, return, DUMMYARG)
323 DEFINEFUNC2(int, SSL_CTX_use_certificate, SSL_CTX *a, a, X509 *b, b, return -1, return)
324 DEFINEFUNC3(int, SSL_CTX_use_certificate_file, SSL_CTX *a, a, const char *b, b, int c, c, return -1, return)
325 DEFINEFUNC2(int, SSL_CTX_use_PrivateKey, SSL_CTX *a, a, EVP_PKEY *b, b, return -1, return)
326 DEFINEFUNC3(int, SSL_CTX_use_PrivateKey_file, SSL_CTX *a, a, const char *b, b, int c, c, return -1, return)
327 DEFINEFUNC(X509_STORE *, SSL_CTX_get_cert_store, const SSL_CTX *a, a, return nullptr, return)
329 DEFINEFUNC(void, SSL_CONF_CTX_free, SSL_CONF_CTX *a, a, return ,return);
330 DEFINEFUNC2(void, SSL_CONF_CTX_set_ssl_ctx, SSL_CONF_CTX *a, a, SSL_CTX *b, b, return, return);
331 DEFINEFUNC2(unsigned int, SSL_CONF_CTX_set_flags, SSL_CONF_CTX *a, a, unsigned int b, b, return 0, return);
332 DEFINEFUNC(int, SSL_CONF_CTX_finish, SSL_CONF_CTX *a, a, return 0, return);
333 DEFINEFUNC3(int, SSL_CONF_cmd, SSL_CONF_CTX *a, a, const char *b, b, const char *c, c, return 0, return);
334 DEFINEFUNC(void, SSL_free, SSL *a, a, return, DUMMYARG)
335 DEFINEFUNC(STACK_OF(SSL_CIPHER) *, SSL_get_ciphers, const SSL *a, a, return nullptr, return)
336 DEFINEFUNC(const SSL_CIPHER *, SSL_get_current_cipher, SSL *a, a, return nullptr, return)
337 DEFINEFUNC(int, SSL_version, const SSL *a, a, return 0, return)
338 DEFINEFUNC2(int, SSL_get_error, SSL *a, a, int b, b, return -1, return)
339 DEFINEFUNC(STACK_OF(X509) *, SSL_get_peer_cert_chain, SSL *a, a, return nullptr, return)
340 
341 #if defined(OPENSSL_VERSION_MAJOR) && OPENSSL_VERSION_MAJOR >= 3
342 DEFINEFUNC(X509 *, SSL_get1_peer_certificate, SSL *a, a, return nullptr, return)
343 DEFINEFUNC(int, EVP_PKEY_get_bits, const EVP_PKEY *pkey, pkey, return -1, return)
344 DEFINEFUNC(int, EVP_PKEY_get_base_id, const EVP_PKEY *pkey, pkey, return -1, return)
345 #else
346 DEFINEFUNC(X509 *, SSL_get_peer_certificate, SSL *a, a, return nullptr, return)
347 DEFINEFUNC(int, EVP_PKEY_base_id, EVP_PKEY *a, a, return NID_undef, return)
348 #endif // OPENSSL_VERSION_MAJOR >= 3
349 
350 DEFINEFUNC(long, SSL_get_verify_result, const SSL *a, a, return -1, return)
351 DEFINEFUNC(SSL *, SSL_new, SSL_CTX *a, a, return nullptr, return)
352 DEFINEFUNC(SSL_CTX *, SSL_get_SSL_CTX, SSL *a, a, return nullptr, return)
353 DEFINEFUNC4(long, SSL_ctrl, SSL *a, a, int cmd, cmd, long larg, larg, void *parg, parg, return -1, return)
354 DEFINEFUNC3(int, SSL_read, SSL *a, a, void *b, b, int c, c, return -1, return)
355 DEFINEFUNC3(void, SSL_set_bio, SSL *a, a, BIO *b, b, BIO *c, c, return, DUMMYARG)
356 DEFINEFUNC(void, SSL_set_accept_state, SSL *a, a, return, DUMMYARG)
357 DEFINEFUNC(void, SSL_set_connect_state, SSL *a, a, return, DUMMYARG)
358 DEFINEFUNC(int, SSL_shutdown, SSL *a, a, return -1, return)
359 DEFINEFUNC(int, SSL_in_init, const SSL *a, a, return 0, return)
360 DEFINEFUNC(int, SSL_get_shutdown, const SSL *ssl, ssl, return 0, return)
361 DEFINEFUNC2(int, SSL_set_session, SSL* to, to, SSL_SESSION *session, session, return -1, return)
362 DEFINEFUNC(void, SSL_SESSION_free, SSL_SESSION *ses, ses, return, DUMMYARG)
363 DEFINEFUNC(SSL_SESSION*, SSL_get1_session, SSL *ssl, ssl, return nullptr, return)
364 DEFINEFUNC(SSL_SESSION*, SSL_get_session, const SSL *ssl, ssl, return nullptr, return)
365 DEFINEFUNC3(int, SSL_set_ex_data, SSL *ssl, ssl, int idx, idx, void *arg, arg, return 0, return)
366 DEFINEFUNC2(void *, SSL_get_ex_data, const SSL *ssl, ssl, int idx, idx, return nullptr, return)
367 
368 #ifndef OPENSSL_NO_PSK
369 DEFINEFUNC2(void, SSL_set_psk_client_callback, SSL* ssl, ssl, q_psk_client_callback_t callback, callback, return, DUMMYARG)
370 DEFINEFUNC2(void, SSL_set_psk_server_callback, SSL* ssl, ssl, q_psk_server_callback_t callback, callback, return, DUMMYARG)
371 DEFINEFUNC2(int, SSL_CTX_use_psk_identity_hint, SSL_CTX* ctx, ctx, const char *hint, hint, return 0, return)
372 #endif // !OPENSSL_NO_PSK
373 
374 DEFINEFUNC3(int, SSL_write, SSL *a, a, const void *b, b, int c, c, return -1, return)
375 DEFINEFUNC2(int, X509_cmp, X509 *a, a, X509 *b, b, return -1, return)
376 DEFINEFUNC4(int, X509_digest, const X509 *x509, x509, const EVP_MD *type, type, unsigned char *md, md, unsigned int *len, len, return -1, return)
377 DEFINEFUNC(X509 *, X509_dup, X509 *a, a, return nullptr, return)
378 DEFINEFUNC2(void, X509_print, BIO *a, a, X509 *b, b, return, DUMMYARG);
379 DEFINEFUNC(ASN1_OBJECT *, X509_EXTENSION_get_object, X509_EXTENSION *a, a, return nullptr, return)
380 DEFINEFUNC(void, X509_free, X509 *a, a, return, DUMMYARG)
381 //Q_AUTOTEST_EXPORT ASN1_TIME *q_X509_gmtime_adj(ASN1_TIME *s, long adj);
382 DEFINEFUNC2(ASN1_TIME *, X509_gmtime_adj, ASN1_TIME *s, s, long adj, adj, return nullptr, return)
383 DEFINEFUNC(void, ASN1_TIME_free, ASN1_TIME *t, t, return, DUMMYARG)
384 DEFINEFUNC2(X509_EXTENSION *, X509_get_ext, X509 *a, a, int b, b, return nullptr, return)
385 DEFINEFUNC(int, X509_get_ext_count, X509 *a, a, return 0, return)
386 DEFINEFUNC4(void *, X509_get_ext_d2i, X509 *a, a, int b, b, int *c, c, int *d, d, return nullptr, return)
387 DEFINEFUNC(const X509V3_EXT_METHOD *, X509V3_EXT_get, X509_EXTENSION *a, a, return nullptr, return)
388 DEFINEFUNC(void *, X509V3_EXT_d2i, X509_EXTENSION *a, a, return nullptr, return)
389 DEFINEFUNC(int, X509_EXTENSION_get_critical, X509_EXTENSION *a, a, return 0, return)
390 DEFINEFUNC(ASN1_OCTET_STRING *, X509_EXTENSION_get_data, X509_EXTENSION *a, a, return nullptr, return)
391 DEFINEFUNC(void, BASIC_CONSTRAINTS_free, BASIC_CONSTRAINTS *a, a, return, DUMMYARG)
392 DEFINEFUNC(void, AUTHORITY_KEYID_free, AUTHORITY_KEYID *a, a, return, DUMMYARG)
393 DEFINEFUNC(void, GENERAL_NAME_free, GENERAL_NAME *a, a, return, DUMMYARG)
394 DEFINEFUNC2(int, ASN1_STRING_print, BIO *a, a, const ASN1_STRING *b, b, return 0, return)
395 DEFINEFUNC2(int, X509_check_issued, X509 *a, a, X509 *b, b, return -1, return)
396 DEFINEFUNC(X509_NAME *, X509_get_issuer_name, X509 *a, a, return nullptr, return)
397 DEFINEFUNC(X509_NAME *, X509_get_subject_name, X509 *a, a, return nullptr, return)
398 DEFINEFUNC(ASN1_INTEGER *, X509_get_serialNumber, X509 *a, a, return nullptr, return)
399 DEFINEFUNC(int, X509_verify_cert, X509_STORE_CTX *a, a, return -1, return)
400 DEFINEFUNC(int, X509_NAME_entry_count, X509_NAME *a, a, return 0, return)
401 DEFINEFUNC2(X509_NAME_ENTRY *, X509_NAME_get_entry, X509_NAME *a, a, int b, b, return nullptr, return)
402 DEFINEFUNC(ASN1_STRING *, X509_NAME_ENTRY_get_data, X509_NAME_ENTRY *a, a, return nullptr, return)
403 DEFINEFUNC(ASN1_OBJECT *, X509_NAME_ENTRY_get_object, X509_NAME_ENTRY *a, a, return nullptr, return)
404 DEFINEFUNC(EVP_PKEY *, X509_PUBKEY_get, X509_PUBKEY *a, a, return nullptr, return)
405 DEFINEFUNC(void, X509_STORE_free, X509_STORE *a, a, return, DUMMYARG)
406 DEFINEFUNC(X509_STORE *, X509_STORE_new, DUMMYARG, DUMMYARG, return nullptr, return)
407 DEFINEFUNC2(int, X509_STORE_add_cert, X509_STORE *a, a, X509 *b, b, return 0, return)
408 DEFINEFUNC(void, X509_STORE_CTX_free, X509_STORE_CTX *a, a, return, DUMMYARG)
409 DEFINEFUNC4(int, X509_STORE_CTX_init, X509_STORE_CTX *a, a, X509_STORE *b, b, X509 *c, c, STACK_OF(X509) *d, d, return -1, return)
410 DEFINEFUNC2(int, X509_STORE_CTX_set_purpose, X509_STORE_CTX *a, a, int b, b, return -1, return)
411 DEFINEFUNC(int, X509_STORE_CTX_get_error, X509_STORE_CTX *a, a, return -1, return)
412 DEFINEFUNC(int, X509_STORE_CTX_get_error_depth, X509_STORE_CTX *a, a, return -1, return)
413 DEFINEFUNC(X509 *, X509_STORE_CTX_get_current_cert, X509_STORE_CTX *a, a, return nullptr, return)
414 DEFINEFUNC(X509_STORE *, X509_STORE_CTX_get0_store, X509_STORE_CTX *ctx, ctx, return nullptr, return)
415 DEFINEFUNC(X509_STORE_CTX *, X509_STORE_CTX_new, DUMMYARG, DUMMYARG, return nullptr, return)
416 DEFINEFUNC2(void *, X509_STORE_CTX_get_ex_data, X509_STORE_CTX *ctx, ctx, int idx, idx, return nullptr, return)
417 DEFINEFUNC(int, SSL_get_ex_data_X509_STORE_CTX_idx, DUMMYARG, DUMMYARG, return -1, return)
418 
419 #if OPENSSL_VERSION_MAJOR < 3
420 DEFINEFUNC3(int, SSL_CTX_load_verify_locations, SSL_CTX *ctx, ctx, const char *CAfile, CAfile, const char *CApath, CApath, return 0, return)
421 #else
422 DEFINEFUNC2(int, SSL_CTX_load_verify_dir, SSL_CTX *ctx, ctx, const char *CApath, CApath, return 0, return)
423 #endif // OPENSSL_VERSION_MAJOR
424 
425 DEFINEFUNC2(int, i2d_SSL_SESSION, SSL_SESSION *in, in, unsigned char **pp, pp, return 0, return)
426 DEFINEFUNC3(SSL_SESSION *, d2i_SSL_SESSION, SSL_SESSION **a, a, const unsigned char **pp, pp, long length, length, return nullptr, return)
427 
428 #ifndef OPENSSL_NO_NEXTPROTONEG
429 DEFINEFUNC6(int, SSL_select_next_proto, unsigned char **out, out, unsigned char *outlen, outlen,
430  const unsigned char *in, in, unsigned int inlen, inlen,
431  const unsigned char *client, client, unsigned int client_len, client_len,
432  return -1, return)
434  int (*cb) (SSL *ssl, unsigned char **out,
435  unsigned char *outlen,
436  const unsigned char *in,
437  unsigned int inlen, void *arg), cb,
438  void *arg, arg, return, DUMMYARG)
439 DEFINEFUNC3(void, SSL_get0_next_proto_negotiated, const SSL *s, s,
440  const unsigned char **data, data, unsigned *len, len, return, DUMMYARG)
441 DEFINEFUNC3(int, SSL_set_alpn_protos, SSL *s, s, const unsigned char *protos, protos,
443 DEFINEFUNC3(void, SSL_CTX_set_alpn_select_cb, SSL_CTX *s, s,
444  int (*cb) (SSL *ssl, const unsigned char **out,
445  unsigned char *outlen,
446  const unsigned char *in,
447  unsigned int inlen, void *arg), cb,
448  void *arg, arg, return, DUMMYARG)
449 DEFINEFUNC3(void, SSL_get0_alpn_selected, const SSL *s, s, const unsigned char **data, data,
450  unsigned *len, len, return, DUMMYARG)
451 #endif // !OPENSSL_NO_NEXTPROTONEG
452 
453 // DTLS:
454 #if QT_CONFIG(dtls)
455 DEFINEFUNC2(void, SSL_CTX_set_cookie_generate_cb, SSL_CTX *ctx, ctx, CookieGenerateCallback cb, cb, return, DUMMYARG)
456 DEFINEFUNC2(void, SSL_CTX_set_cookie_verify_cb, SSL_CTX *ctx, ctx, CookieVerifyCallback cb, cb, return, DUMMYARG)
457 DEFINEFUNC(const SSL_METHOD *, DTLS_server_method, DUMMYARG, DUMMYARG, return nullptr, return)
458 DEFINEFUNC(const SSL_METHOD *, DTLS_client_method, DUMMYARG, DUMMYARG, return nullptr, return)
459 #endif // dtls
460 DEFINEFUNC2(void, BIO_set_flags, BIO *b, b, int flags, flags, return, DUMMYARG)
461 DEFINEFUNC2(void, BIO_clear_flags, BIO *b, b, int flags, flags, return, DUMMYARG)
462 DEFINEFUNC2(void *, BIO_get_ex_data, BIO *b, b, int idx, idx, return nullptr, return)
463 DEFINEFUNC3(int, BIO_set_ex_data, BIO *b, b, int idx, idx, void *data, data, return -1, return)
464 
465 DEFINEFUNC3(void *, CRYPTO_malloc, size_t num, num, const char *file, file, int line, line, return nullptr, return)
466 DEFINEFUNC(DH *, DH_new, DUMMYARG, DUMMYARG, return nullptr, return)
467 DEFINEFUNC(void, DH_free, DH *dh, dh, return, DUMMYARG)
468 DEFINEFUNC3(DH *, d2i_DHparams, DH**a, a, const unsigned char **pp, pp, long length, length, return nullptr, return)
469 DEFINEFUNC2(int, i2d_DHparams, DH *a, a, unsigned char **p, p, return -1, return)
470 DEFINEFUNC2(int, DH_check, DH *dh, dh, int *codes, codes, return 0, return)
471 DEFINEFUNC3(BIGNUM *, BN_bin2bn, const unsigned char *s, s, int len, len, BIGNUM *ret, ret, return nullptr, return)
472 
473 #ifndef OPENSSL_NO_EC
474 DEFINEFUNC2(size_t, EC_get_builtin_curves, EC_builtin_curve * r, r, size_t nitems, nitems, return 0, return)
475 DEFINEFUNC(int, EC_curve_nist2nid, const char *name, name, return 0, return)
476 #endif // OPENSSL_NO_EC
477 
478 DEFINEFUNC5(int, PKCS12_parse, PKCS12 *p12, p12, const char *pass, pass, EVP_PKEY **pkey, pkey, \
479  X509 **cert, cert, STACK_OF(X509) **ca, ca, return 1, return);
480 DEFINEFUNC2(PKCS12 *, d2i_PKCS12_bio, BIO *bio, bio, PKCS12 **pkcs12, pkcs12, return nullptr, return);
481 DEFINEFUNC(void, PKCS12_free, PKCS12 *pkcs12, pkcs12, return, DUMMYARG)
482 
483 #ifndef OPENSSL_NO_DEPRECATED_3_0
484 
485 DEFINEFUNC4(DSA *, PEM_read_bio_DSA_PUBKEY, BIO *a, a, DSA **b, b, pem_password_cb *c, c, void *d, d, return nullptr, return)
486 DEFINEFUNC4(RSA *, PEM_read_bio_RSA_PUBKEY, BIO *a, a, RSA **b, b, pem_password_cb *c, c, void *d, d, return nullptr, return)
487 DEFINEFUNC4(DSA *, PEM_read_bio_DSAPrivateKey, BIO *a, a, DSA **b, b, pem_password_cb *c, c, void *d, d, return nullptr, return)
488 DEFINEFUNC4(RSA *, PEM_read_bio_RSAPrivateKey, BIO *a, a, RSA **b, b, pem_password_cb *c, c, void *d, d, return nullptr, return)
489 
490 DEFINEFUNC2(int, PEM_write_bio_DSA_PUBKEY, BIO *a, a, DSA *b, b, return 0, return)
491 DEFINEFUNC2(int, PEM_write_bio_RSA_PUBKEY, BIO *a, a, RSA *b, b, return 0, return)
492 DEFINEFUNC7(int, PEM_write_bio_DSAPrivateKey, BIO *a, a, DSA *b, b, const EVP_CIPHER *c, c, unsigned char *d, d, int e, e, pem_password_cb *f, f, void *g, g, return 0, return)
493 DEFINEFUNC7(int, PEM_write_bio_RSAPrivateKey, BIO *a, a, RSA *b, b, const EVP_CIPHER *c, c, unsigned char *d, d, int e, e, pem_password_cb *f, f, void *g, g, return 0, return)
494 
495 DEFINEFUNC2(int, SSL_CTX_use_RSAPrivateKey, SSL_CTX *a, a, RSA *b, b, return -1, return)
496 
497 DEFINEFUNC(DSA *, DSA_new, DUMMYARG, DUMMYARG, return nullptr, return)
498 DEFINEFUNC(void, DSA_free, DSA *a, a, return, DUMMYARG)
499 
500 DEFINEFUNC(RSA *, RSA_new, DUMMYARG, DUMMYARG, return nullptr, return)
501 DEFINEFUNC(void, RSA_free, RSA *a, a, return, DUMMYARG)
502 
503 DEFINEFUNC(int, RSA_bits, RSA *a, a, return 0, return)
504 DEFINEFUNC(int, DSA_bits, DSA *a, a, return 0, return)
505 DEFINEFUNC(int, DH_bits, DH *dh, dh, return 0, return)
506 
507 DEFINEFUNC(DSA *, EVP_PKEY_get1_DSA, EVP_PKEY *a, a, return nullptr, return)
508 DEFINEFUNC(RSA *, EVP_PKEY_get1_RSA, EVP_PKEY *a, a, return nullptr, return)
509 DEFINEFUNC(DH *, EVP_PKEY_get1_DH, EVP_PKEY *a, a, return nullptr, return)
510 
511 DEFINEFUNC2(int, EVP_PKEY_cmp, const EVP_PKEY *a, a, const EVP_PKEY *b, b, return -1, return)
512 DEFINEFUNC3(int, EVP_PKEY_assign, EVP_PKEY *a, a, int b, b, void *r, r, return -1, return)
513 
514 DEFINEFUNC2(int, EVP_PKEY_set1_RSA, EVP_PKEY *a, a, RSA *b, b, return -1, return)
515 DEFINEFUNC2(int, EVP_PKEY_set1_DSA, EVP_PKEY *a, a, DSA *b, b, return -1, return)
516 DEFINEFUNC2(int, EVP_PKEY_set1_DH, EVP_PKEY *a, a, DH *b, b, return -1, return)
517 
518 #ifndef OPENSSL_NO_EC
519 
520 DEFINEFUNC4(EC_KEY *, PEM_read_bio_EC_PUBKEY, BIO *a, a, EC_KEY **b, b, pem_password_cb *c, c, void *d, d, return nullptr, return)
521 DEFINEFUNC4(EC_KEY *, PEM_read_bio_ECPrivateKey, BIO *a, a, EC_KEY **b, b, pem_password_cb *c, c, void *d, d, return nullptr, return)
522 
523 DEFINEFUNC2(int, PEM_write_bio_EC_PUBKEY, BIO *a, a, EC_KEY *b, b, return 0, return)
524 DEFINEFUNC7(int, PEM_write_bio_ECPrivateKey, BIO *a, a, EC_KEY *b, b, const EVP_CIPHER *c, c, unsigned char *d, d, int e, e, pem_password_cb *f, f, void *g, g, return 0, return)
525 
526 DEFINEFUNC(const EC_GROUP*, EC_KEY_get0_group, const EC_KEY* k, k, return nullptr, return)
527 DEFINEFUNC(int, EC_GROUP_get_degree, const EC_GROUP* g, g, return 0, return)
528 
529 DEFINEFUNC2(int, EVP_PKEY_set1_EC_KEY, EVP_PKEY *a, a, EC_KEY *b, b, return -1, return)
530 DEFINEFUNC(EC_KEY *, EVP_PKEY_get1_EC_KEY, EVP_PKEY *a, a, return nullptr, return)
531 
532 DEFINEFUNC(EC_KEY *, EC_KEY_dup, const EC_KEY *ec, ec, return nullptr, return)
533 DEFINEFUNC(EC_KEY *, EC_KEY_new_by_curve_name, int nid, nid, return nullptr, return)
534 DEFINEFUNC(void, EC_KEY_free, EC_KEY *ecdh, ecdh, return, DUMMYARG)
535 
536 #endif // OPENSSL_NO_EC
537 
538 
539 
540 #endif
541 
542 #define RESOLVEFUNC(func) \
543  if (!(_q_##func = _q_PTR_##func(libs.ssl->resolve(#func))) \
544  && !(_q_##func = _q_PTR_##func(libs.crypto->resolve(#func)))) \
545  qsslSocketCannotResolveSymbolWarning(#func);
546 
547 #if !defined QT_LINKED_OPENSSL
548 
549 #if !QT_CONFIG(library)
551 {
552  qCWarning(lcTlsBackend, "QSslSocket: unable to resolve symbols. Qt is configured without the "
553  "'library' feature, which means runtime resolving of libraries won't work.");
554  qCWarning(lcTlsBackend, "Either compile Qt statically or with support for runtime resolving "
555  "of libraries.");
556  return false;
557 }
558 #else
559 
560 # ifdef Q_OS_UNIX
561 struct NumericallyLess
562 {
563  typedef bool result_type;
564  result_type operator()(QStringView lhs, QStringView rhs) const
565  {
566  bool ok = false;
567  int b = 0;
568  int a = lhs.toInt(&ok);
569  if (ok)
570  b = rhs.toInt(&ok);
571  if (ok) {
572  // both toInt succeeded
573  return a < b;
574  } else {
575  // compare as strings;
576  return lhs < rhs;
577  }
578  }
579 };
580 
581 struct LibGreaterThan
582 {
583  typedef bool result_type;
584  result_type operator()(QStringView lhs, QStringView rhs) const
585  {
586  const auto lhsparts = lhs.split(QLatin1Char('.'));
587  const auto rhsparts = rhs.split(QLatin1Char('.'));
588  Q_ASSERT(lhsparts.count() > 1 && rhsparts.count() > 1);
589 
590  // note: checking rhs < lhs, the same as lhs > rhs
591  return std::lexicographical_compare(rhsparts.begin() + 1, rhsparts.end(),
592  lhsparts.begin() + 1, lhsparts.end(),
593  NumericallyLess());
594  }
595 };
596 
597 #if defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)
598 static int dlIterateCallback(struct dl_phdr_info *info, size_t size, void *data)
599 {
600  if (size < sizeof (info->dlpi_addr) + sizeof (info->dlpi_name))
601  return 1;
603  QString path = QString::fromLocal8Bit(info->dlpi_name);
604  if (!path.isEmpty()) {
605  QFileInfo fi(path);
606  path = fi.absolutePath();
607  if (!path.isEmpty())
608  (void)paths->hasSeen(std::move(path));
609  }
610  return 0;
611 }
612 #endif
613 
614 static QStringList libraryPathList()
615 {
617 # ifdef Q_OS_DARWIN
618  paths = QString::fromLatin1(qgetenv("DYLD_LIBRARY_PATH"))
620 
621  // search in .app/Contents/Frameworks
622  UInt32 packageType;
623  CFBundleGetPackageInfo(CFBundleGetMainBundle(), &packageType, nullptr);
624  if (packageType == FOUR_CHAR_CODE('APPL')) {
625  QUrl bundleUrl = QUrl::fromCFURL(QCFType<CFURLRef>(CFBundleCopyBundleURL(CFBundleGetMainBundle())));
626  QUrl frameworksUrl = QUrl::fromCFURL(QCFType<CFURLRef>(CFBundleCopyPrivateFrameworksURL(CFBundleGetMainBundle())));
627  paths << bundleUrl.resolved(frameworksUrl).path();
628  }
629 # else
630  paths = QString::fromLatin1(qgetenv("LD_LIBRARY_PATH"))
632 # endif
633  paths << QLatin1String("/lib") << QLatin1String("/usr/lib") << QLatin1String("/usr/local/lib");
634  paths << QLatin1String("/lib64") << QLatin1String("/usr/lib64") << QLatin1String("/usr/local/lib64");
635  paths << QLatin1String("/lib32") << QLatin1String("/usr/lib32") << QLatin1String("/usr/local/lib32");
636 
637 #if defined(Q_OS_ANDROID)
638  paths << QLatin1String("/system/lib");
639 #elif defined(Q_OS_LINUX)
640  // discover paths of already loaded libraries
641  QDuplicateTracker<QString> loadedPaths;
642  dl_iterate_phdr(dlIterateCallback, &loadedPaths);
643  std::move(loadedPaths).appendTo(paths);
644 #endif
645 
646  return paths;
647 }
648 
649 Q_NEVER_INLINE
650 static QStringList findAllLibs(QLatin1String filter)
651 {
652  const QStringList paths = libraryPathList();
653  QStringList found;
654  const QStringList filters((QString(filter)));
655 
656  for (const QString &path : paths) {
657  QDir dir(path);
658  QStringList entryList = dir.entryList(filters, QDir::Files);
659 
660  std::sort(entryList.begin(), entryList.end(), LibGreaterThan());
661  for (const QString &entry : qAsConst(entryList))
662  found << path + QLatin1Char('/') + entry;
663  }
664 
665  return found;
666 }
667 
668 static QStringList findAllLibSsl()
669 {
670  return findAllLibs(QLatin1String("libssl.*"));
671 }
672 
673 static QStringList findAllLibCrypto()
674 {
675  return findAllLibs(QLatin1String("libcrypto.*"));
676 }
677 # endif
678 
679 #ifdef Q_OS_WIN
680 
681 struct LoadedOpenSsl {
682  std::unique_ptr<QSystemLibrary> ssl, crypto;
683 };
684 
685 static bool tryToLoadOpenSslWin32Library(QLatin1String ssleay32LibName, QLatin1String libeay32LibName, LoadedOpenSsl &result)
686 {
687  auto ssleay32 = std::make_unique<QSystemLibrary>(ssleay32LibName);
688  if (!ssleay32->load(false)) {
689  return FALSE;
690  }
691 
692  auto libeay32 = std::make_unique<QSystemLibrary>(libeay32LibName);
693  if (!libeay32->load(false)) {
694  return FALSE;
695  }
696 
697  result.ssl = std::move(ssleay32);
698  result.crypto = std::move(libeay32);
699  return TRUE;
700 }
701 
702 static LoadedOpenSsl loadOpenSsl()
703 {
704  LoadedOpenSsl result;
705 
706  // With OpenSSL 1.1 the names have changed to libssl-1_1 and libcrypto-1_1 for builds using
707  // MSVC and GCC. For 3.0 the version suffix changed again, to just '3'.
708  // For non-x86 builds, an architecture suffix is also appended.
709 
710 #if (OPENSSL_VERSION_NUMBER >> 28) < 3
711 #define QT_OPENSSL_VERSION "1_1"
712 #elif OPENSSL_VERSION_MAJOR == 3 // Starting with 3.0 this define is available
713 #define QT_OPENSSL_VERSION "3"
714 #endif // > 3 intentionally left undefined
715 
716 #if defined(Q_PROCESSOR_X86_64)
717 #define QT_SSL_SUFFIX "-x64"
718 #elif defined(Q_PROCESSOR_ARM_64)
719 #define QT_SSL_SUFFIX "-arm64"
720 #elif defined(Q_PROCESSOR_ARM_32)
721 #define QT_SSL_SUFFIX "-arm"
722 #else
723 #define QT_SSL_SUFFIX
724 #endif
725 
726  tryToLoadOpenSslWin32Library(QLatin1String("libssl-" QT_OPENSSL_VERSION QT_SSL_SUFFIX),
727  QLatin1String("libcrypto-" QT_OPENSSL_VERSION QT_SSL_SUFFIX), result);
728 
729 #undef QT_SSL_SUFFIX
730  return result;
731 }
732 #else
733 
734 struct LoadedOpenSsl {
735  std::unique_ptr<QLibrary> ssl, crypto;
736 };
737 
738 static LoadedOpenSsl loadOpenSsl()
739 {
740  LoadedOpenSsl result = { std::make_unique<QLibrary>(), std::make_unique<QLibrary>() };
741 
742 # if defined(Q_OS_UNIX)
743  QLibrary * const libssl = result.ssl.get();
744  QLibrary * const libcrypto = result.crypto.get();
745 
746  // Try to find the libssl library on the system.
747  //
748  // Up until Qt 4.3, this only searched for the "ssl" library at version -1, that
749  // is, libssl.so on most Unix systems. However, the .so file isn't present in
750  // user installations because it's considered a development file.
751  //
752  // The right thing to do is to load the library at the major version we know how
753  // to work with: the SHLIB_VERSION_NUMBER version (macro defined in opensslv.h)
754  //
755  // However, OpenSSL is a well-known case of binary-compatibility breakage. To
756  // avoid such problems, many system integrators and Linux distributions change
757  // the soname of the binary, letting the full version number be the soname. So
758  // we'll find libssl.so.0.9.7, libssl.so.0.9.8, etc. in the system. For that
759  // reason, we will search a few common paths (see findAllLibSsl() above) in hopes
760  // we find one that works.
761  //
762  // If that fails, for OpenSSL 1.0 we also try some fallbacks -- look up
763  // libssl.so with a hardcoded soname. The reason is QTBUG-68156: the binary
764  // builds of Qt happen (at the time of this writing) on RHEL machines,
765  // which change SHLIB_VERSION_NUMBER to a non-portable string. When running
766  // those binaries on the target systems, this code won't pick up
767  // libssl.so.MODIFIED_SHLIB_VERSION_NUMBER because it doesn't exist there.
768  // Given that the only 1.0 supported release (at the time of this writing)
769  // is 1.0.2, with soname "1.0.0", give that a try too. Note that we mandate
770  // OpenSSL >= 1.0.0 with a configure-time check, and OpenSSL has kept binary
771  // compatibility between 1.0.0 and 1.0.2.
772  //
773  // It is important, however, to try the canonical name and the unversioned name
774  // without going through the loop. By not specifying a path, we let the system
775  // dlopen(3) function determine it for us. This will include any DT_RUNPATH or
776  // DT_RPATH tags on our library header as well as other system-specific search
777  // paths. See the man page for dlopen(3) on your system for more information.
778 
779 #ifdef Q_OS_OPENBSD
781 #endif
782 #if defined(SHLIB_VERSION_NUMBER) && !defined(Q_OS_QNX) // on QNX, the libs are always libssl.so and libcrypto.so
783  // first attempt: the canonical name is libssl.so.<SHLIB_VERSION_NUMBER>
784  libssl->setFileNameAndVersion(QLatin1String("ssl"), QLatin1String(SHLIB_VERSION_NUMBER));
785  libcrypto->setFileNameAndVersion(QLatin1String("crypto"), QLatin1String(SHLIB_VERSION_NUMBER));
786  if (libcrypto->load() && libssl->load()) {
787  // libssl.so.<SHLIB_VERSION_NUMBER> and libcrypto.so.<SHLIB_VERSION_NUMBER> found
788  return result;
789  } else {
790  libssl->unload();
791  libcrypto->unload();
792  }
793 #endif
794 
795 #ifndef Q_OS_DARWIN
796  // second attempt: find the development files libssl.so and libcrypto.so
797  //
798  // disabled on macOS/iOS:
799  // macOS's /usr/lib/libssl.dylib, /usr/lib/libcrypto.dylib will be picked up in the third
800  // attempt, _after_ <bundle>/Contents/Frameworks has been searched.
801  // iOS does not ship a system libssl.dylib, libcrypto.dylib in the first place.
802 # if defined(Q_OS_ANDROID)
803  // OpenSSL 1.1.x must be suffixed otherwise it will use the system libcrypto.so libssl.so which on API-21 are OpenSSL 1.0 not 1.1
804  auto openSSLSuffix = [](const QByteArray &defaultSuffix = {}) {
805  auto suffix = qgetenv("ANDROID_OPENSSL_SUFFIX");
806  if (suffix.isEmpty())
807  return defaultSuffix;
808  return suffix;
809  };
810 
811  static QString suffix = QString::fromLatin1(openSSLSuffix("_1_1"));
812 
813  libssl->setFileNameAndVersion(QLatin1String("ssl") + suffix, -1);
814  libcrypto->setFileNameAndVersion(QLatin1String("crypto") + suffix, -1);
815 # else
816  libssl->setFileNameAndVersion(QLatin1String("ssl"), -1);
817  libcrypto->setFileNameAndVersion(QLatin1String("crypto"), -1);
818 # endif
819  if (libcrypto->load() && libssl->load()) {
820  // libssl.so.0 and libcrypto.so.0 found
821  return result;
822  } else {
823  libssl->unload();
824  libcrypto->unload();
825  }
826 #endif
827 
828  // third attempt: loop on the most common library paths and find libssl
829  const QStringList sslList = findAllLibSsl();
830  const QStringList cryptoList = findAllLibCrypto();
831 
832  for (const QString &crypto : cryptoList) {
833 #ifdef Q_OS_DARWIN
834  // Clients should not load the unversioned libcrypto dylib as it does not have a stable ABI
835  if (crypto.endsWith("libcrypto.dylib"))
836  continue;
837 #endif
838  libcrypto->setFileNameAndVersion(crypto, -1);
839  if (libcrypto->load()) {
840  QFileInfo fi(crypto);
842 
843  for (const QString &ssl : sslList) {
844  if (!ssl.endsWith(version))
845  continue;
846 
847  libssl->setFileNameAndVersion(ssl, -1);
848 
849  if (libssl->load()) {
850  // libssl.so.x and libcrypto.so.x found
851  return result;
852  } else {
853  libssl->unload();
854  }
855  }
856  }
857  libcrypto->unload();
858  }
859 
860  // failed to load anything
861  result = {};
862  return result;
863 
864 # else
865  // not implemented for this platform yet
866  return result;
867 # endif
868 }
869 #endif
870 
871 static QBasicMutex symbolResolveMutex;
872 static QBasicAtomicInt symbolsResolved = Q_BASIC_ATOMIC_INITIALIZER(false);
873 static bool triedToResolveSymbols = false;
874 
876 {
877  if (symbolsResolved.loadAcquire())
878  return true;
879  QMutexLocker locker(&symbolResolveMutex);
880  if (symbolsResolved.loadRelaxed())
881  return true;
882  if (triedToResolveSymbols)
883  return false;
884  triedToResolveSymbols = true;
885 
886  LoadedOpenSsl libs = loadOpenSsl();
887  if (!libs.ssl || !libs.crypto) {
888  qCWarning(lcTlsBackend, "Failed to load libssl/libcrypto.");
889  return false;
890  }
891 
892  RESOLVEFUNC(OPENSSL_init_ssl)
893  RESOLVEFUNC(OPENSSL_init_crypto)
894  RESOLVEFUNC(ASN1_STRING_get0_data)
895  RESOLVEFUNC(EVP_CIPHER_CTX_reset)
896  RESOLVEFUNC(AUTHORITY_INFO_ACCESS_free)
897  RESOLVEFUNC(EVP_PKEY_up_ref)
898  RESOLVEFUNC(EVP_PKEY_CTX_new)
899  RESOLVEFUNC(EVP_PKEY_param_check)
900  RESOLVEFUNC(EVP_PKEY_CTX_free)
901  RESOLVEFUNC(OPENSSL_sk_new_null)
902  RESOLVEFUNC(OPENSSL_sk_push)
903  RESOLVEFUNC(OPENSSL_sk_free)
904  RESOLVEFUNC(OPENSSL_sk_num)
905  RESOLVEFUNC(OPENSSL_sk_pop_free)
906  RESOLVEFUNC(OPENSSL_sk_value)
907  RESOLVEFUNC(DH_get0_pqg)
908  RESOLVEFUNC(SSL_CTX_set_options)
909  RESOLVEFUNC(SSL_set_info_callback)
910  RESOLVEFUNC(SSL_alert_type_string)
911  RESOLVEFUNC(SSL_alert_desc_string_long)
912  RESOLVEFUNC(SSL_CTX_get_security_level)
913  RESOLVEFUNC(SSL_CTX_set_security_level)
914 #ifdef TLS1_3_VERSION
915  RESOLVEFUNC(SSL_CTX_set_ciphersuites)
916  RESOLVEFUNC(SSL_set_psk_use_session_callback)
917  RESOLVEFUNC(SSL_CTX_sess_set_new_cb)
918  RESOLVEFUNC(SSL_SESSION_is_resumable)
919 #endif // TLS 1.3 or OpenSSL > 1.1.1
920 
921  RESOLVEFUNC(SSL_get_client_random)
922  RESOLVEFUNC(SSL_SESSION_get_master_key)
923  RESOLVEFUNC(SSL_session_reused)
924  RESOLVEFUNC(SSL_get_session)
925  RESOLVEFUNC(SSL_set_options)
926  RESOLVEFUNC(CRYPTO_get_ex_new_index)
927  RESOLVEFUNC(TLS_method)
928  RESOLVEFUNC(TLS_client_method)
929  RESOLVEFUNC(TLS_server_method)
930  RESOLVEFUNC(X509_up_ref)
931  RESOLVEFUNC(X509_STORE_CTX_get0_chain)
932  RESOLVEFUNC(X509_getm_notBefore)
933  RESOLVEFUNC(X509_getm_notAfter)
934  RESOLVEFUNC(ASN1_item_free)
935  RESOLVEFUNC(X509V3_conf_free)
936  RESOLVEFUNC(X509_get_version)
937  RESOLVEFUNC(X509_get_pubkey)
938  RESOLVEFUNC(X509_STORE_set_verify_cb)
939  RESOLVEFUNC(X509_STORE_set_ex_data)
940  RESOLVEFUNC(X509_STORE_get_ex_data)
941  RESOLVEFUNC(CRYPTO_free)
942  RESOLVEFUNC(OpenSSL_version_num)
943  RESOLVEFUNC(OpenSSL_version)
944 
945  if (!_q_OpenSSL_version || !_q_OpenSSL_version_num) {
946  // Apparently, we were built with OpenSSL 1.1 enabled but are now using
947  // a wrong library.
948  qCWarning(lcTlsBackend, "Incompatible version of OpenSSL");
949  return false;
950  }
951 
952 #if OPENSSL_VERSION_NUMBER >= 0x30000000
953  if (q_OpenSSL_version_num() < 0x30000000) {
954  qCWarning(lcTlsBackend, "Incompatible version of OpenSSL (built with OpenSSL >= 3.x, runtime version is < 3.x)");
955  return false;
956  }
957 #else
958  if (q_OpenSSL_version_num() >= 0x30000000) {
959  qCWarning(lcTlsBackend, "Incompatible version of OpenSSL (built with OpenSSL 1.x, runtime version is >= 3.x)");
960  return false;
961  }
962 #endif // OPENSSL_VERSION_NUMBER
963 
964  RESOLVEFUNC(SSL_SESSION_get_ticket_lifetime_hint)
965 
966 #if QT_CONFIG(dtls)
967  RESOLVEFUNC(DTLSv1_listen)
968  RESOLVEFUNC(BIO_ADDR_new)
969  RESOLVEFUNC(BIO_ADDR_free)
970  RESOLVEFUNC(BIO_meth_new)
971  RESOLVEFUNC(BIO_meth_free)
972  RESOLVEFUNC(BIO_meth_set_write)
973  RESOLVEFUNC(BIO_meth_set_read)
974  RESOLVEFUNC(BIO_meth_set_puts)
975  RESOLVEFUNC(BIO_meth_set_ctrl)
976  RESOLVEFUNC(BIO_meth_set_create)
977  RESOLVEFUNC(BIO_meth_set_destroy)
978 #endif // dtls
979 
980 #if QT_CONFIG(ocsp)
981  RESOLVEFUNC(OCSP_SINGLERESP_get0_id)
982  RESOLVEFUNC(d2i_OCSP_RESPONSE)
983  RESOLVEFUNC(OCSP_RESPONSE_free)
984  RESOLVEFUNC(OCSP_response_status)
985  RESOLVEFUNC(OCSP_response_get1_basic)
986  RESOLVEFUNC(OCSP_BASICRESP_free)
987  RESOLVEFUNC(OCSP_basic_verify)
988  RESOLVEFUNC(OCSP_resp_count)
989  RESOLVEFUNC(OCSP_resp_get0)
990  RESOLVEFUNC(OCSP_single_get0_status)
991  RESOLVEFUNC(OCSP_check_validity)
992  RESOLVEFUNC(OCSP_cert_to_id)
993  RESOLVEFUNC(OCSP_id_get0_info)
994  RESOLVEFUNC(OCSP_resp_get0_certs)
995  RESOLVEFUNC(OCSP_basic_sign)
996  RESOLVEFUNC(OCSP_response_create)
997  RESOLVEFUNC(i2d_OCSP_RESPONSE)
998  RESOLVEFUNC(OCSP_basic_add1_status)
999  RESOLVEFUNC(OCSP_BASICRESP_new)
1000  RESOLVEFUNC(OCSP_CERTID_free)
1001  RESOLVEFUNC(OCSP_cert_to_id)
1002  RESOLVEFUNC(OCSP_id_cmp)
1003 #endif // ocsp
1004 
1005  RESOLVEFUNC(BIO_set_data)
1006  RESOLVEFUNC(BIO_get_data)
1007  RESOLVEFUNC(BIO_set_init)
1008  RESOLVEFUNC(BIO_get_shutdown)
1009  RESOLVEFUNC(BIO_set_shutdown)
1010  RESOLVEFUNC(ASN1_INTEGER_get)
1011  RESOLVEFUNC(ASN1_INTEGER_cmp)
1012  RESOLVEFUNC(ASN1_STRING_length)
1013  RESOLVEFUNC(ASN1_STRING_to_UTF8)
1014  RESOLVEFUNC(ASN1_TIME_to_tm)
1015  RESOLVEFUNC(BIO_ctrl)
1016  RESOLVEFUNC(BIO_free)
1017  RESOLVEFUNC(BIO_new)
1018  RESOLVEFUNC(BIO_new_mem_buf)
1019  RESOLVEFUNC(BIO_read)
1020  RESOLVEFUNC(BIO_s_mem)
1021  RESOLVEFUNC(BIO_write)
1022  RESOLVEFUNC(BIO_set_flags)
1023  RESOLVEFUNC(BIO_clear_flags)
1024  RESOLVEFUNC(BIO_set_ex_data)
1025  RESOLVEFUNC(BIO_get_ex_data)
1026  RESOLVEFUNC(BN_num_bits)
1027  RESOLVEFUNC(BN_is_word)
1028  RESOLVEFUNC(BN_mod_word)
1029  RESOLVEFUNC(ERR_error_string)
1030  RESOLVEFUNC(ERR_error_string_n)
1031  RESOLVEFUNC(ERR_get_error)
1032  RESOLVEFUNC(EVP_CIPHER_CTX_new)
1033  RESOLVEFUNC(EVP_CIPHER_CTX_free)
1034  RESOLVEFUNC(EVP_CIPHER_CTX_ctrl)
1035  RESOLVEFUNC(EVP_CIPHER_CTX_set_key_length)
1036  RESOLVEFUNC(EVP_CipherInit)
1037  RESOLVEFUNC(EVP_CipherInit_ex)
1038  RESOLVEFUNC(EVP_CipherUpdate)
1039  RESOLVEFUNC(EVP_CipherFinal)
1040  RESOLVEFUNC(EVP_get_digestbyname)
1041 #ifndef OPENSSL_NO_DES
1042  RESOLVEFUNC(EVP_des_cbc)
1043  RESOLVEFUNC(EVP_des_ede3_cbc)
1044 #endif
1045 #ifndef OPENSSL_NO_RC2
1046  RESOLVEFUNC(EVP_rc2_cbc)
1047 #endif
1048 #ifndef OPENSSL_NO_AES
1049  RESOLVEFUNC(EVP_aes_128_cbc)
1050  RESOLVEFUNC(EVP_aes_192_cbc)
1051  RESOLVEFUNC(EVP_aes_256_cbc)
1052 #endif
1053  RESOLVEFUNC(EVP_sha1)
1054  RESOLVEFUNC(EVP_PKEY_free)
1055  RESOLVEFUNC(EVP_PKEY_new)
1056  RESOLVEFUNC(EVP_PKEY_type)
1057  RESOLVEFUNC(OBJ_nid2sn)
1058  RESOLVEFUNC(OBJ_nid2ln)
1059  RESOLVEFUNC(OBJ_sn2nid)
1060  RESOLVEFUNC(OBJ_ln2nid)
1061  RESOLVEFUNC(i2t_ASN1_OBJECT)
1062  RESOLVEFUNC(OBJ_obj2txt)
1063  RESOLVEFUNC(OBJ_obj2nid)
1064  RESOLVEFUNC(PEM_read_bio_PrivateKey)
1065  RESOLVEFUNC(PEM_read_bio_DHparams)
1066  RESOLVEFUNC(PEM_write_bio_PrivateKey)
1067  RESOLVEFUNC(PEM_write_bio_PrivateKey_traditional)
1068  RESOLVEFUNC(PEM_read_bio_PUBKEY)
1069  RESOLVEFUNC(PEM_write_bio_PUBKEY)
1070  RESOLVEFUNC(RAND_seed)
1071  RESOLVEFUNC(RAND_status)
1072  RESOLVEFUNC(RAND_bytes)
1073  RESOLVEFUNC(SSL_CIPHER_description)
1074  RESOLVEFUNC(SSL_CIPHER_get_bits)
1075  RESOLVEFUNC(SSL_get_rbio)
1076  RESOLVEFUNC(SSL_CTX_check_private_key)
1077  RESOLVEFUNC(SSL_CTX_ctrl)
1078  RESOLVEFUNC(SSL_CTX_free)
1079  RESOLVEFUNC(SSL_CTX_new)
1080  RESOLVEFUNC(SSL_CTX_set_cipher_list)
1081  RESOLVEFUNC(SSL_CTX_callback_ctrl)
1082  RESOLVEFUNC(SSL_CTX_set_default_verify_paths)
1083  RESOLVEFUNC(SSL_CTX_set_verify)
1084  RESOLVEFUNC(SSL_CTX_set_verify_depth)
1085  RESOLVEFUNC(SSL_CTX_use_certificate)
1086  RESOLVEFUNC(SSL_CTX_use_certificate_file)
1087  RESOLVEFUNC(SSL_CTX_use_PrivateKey)
1088  RESOLVEFUNC(SSL_CTX_use_PrivateKey_file)
1089  RESOLVEFUNC(SSL_CTX_get_cert_store);
1091  RESOLVEFUNC(SSL_CONF_CTX_free);
1092  RESOLVEFUNC(SSL_CONF_CTX_set_ssl_ctx);
1093  RESOLVEFUNC(SSL_CONF_CTX_set_flags);
1094  RESOLVEFUNC(SSL_CONF_CTX_finish);
1095  RESOLVEFUNC(SSL_CONF_cmd);
1096  RESOLVEFUNC(SSL_accept)
1097  RESOLVEFUNC(SSL_clear)
1098  RESOLVEFUNC(SSL_connect)
1099  RESOLVEFUNC(SSL_free)
1100  RESOLVEFUNC(SSL_get_ciphers)
1101  RESOLVEFUNC(SSL_get_current_cipher)
1102  RESOLVEFUNC(SSL_version)
1103  RESOLVEFUNC(SSL_get_error)
1104  RESOLVEFUNC(SSL_get_peer_cert_chain)
1105 
1106 #if defined(OPENSSL_VERSION_MAJOR) && OPENSSL_VERSION_MAJOR >= 3
1107  RESOLVEFUNC(SSL_get1_peer_certificate)
1108  RESOLVEFUNC(EVP_PKEY_get_bits)
1109  RESOLVEFUNC(EVP_PKEY_get_base_id)
1110 #else
1111  RESOLVEFUNC(SSL_get_peer_certificate)
1112  RESOLVEFUNC(EVP_PKEY_base_id)
1113 #endif // OPENSSL_VERSION_MAJOR >= 3
1114 
1115 #ifndef OPENSSL_NO_DEPRECATED_3_0
1116  RESOLVEFUNC(EVP_PKEY_assign)
1117  RESOLVEFUNC(EVP_PKEY_cmp)
1118 
1119  RESOLVEFUNC(EVP_PKEY_set1_RSA)
1120  RESOLVEFUNC(EVP_PKEY_set1_DSA)
1121  RESOLVEFUNC(EVP_PKEY_set1_DH)
1122 
1123  RESOLVEFUNC(EVP_PKEY_get1_DSA)
1124  RESOLVEFUNC(EVP_PKEY_get1_RSA)
1125  RESOLVEFUNC(EVP_PKEY_get1_DH)
1126 
1127  RESOLVEFUNC(PEM_read_bio_DSA_PUBKEY)
1128  RESOLVEFUNC(PEM_read_bio_RSA_PUBKEY)
1129  RESOLVEFUNC(PEM_read_bio_DSAPrivateKey)
1130  RESOLVEFUNC(PEM_read_bio_RSAPrivateKey)
1131 
1132  RESOLVEFUNC(PEM_write_bio_DSA_PUBKEY)
1133  RESOLVEFUNC(PEM_write_bio_RSA_PUBKEY)
1134  RESOLVEFUNC(PEM_write_bio_DSAPrivateKey)
1135  RESOLVEFUNC(PEM_write_bio_RSAPrivateKey)
1136  RESOLVEFUNC(SSL_CTX_use_RSAPrivateKey)
1137 
1138  RESOLVEFUNC(DSA_new)
1139  RESOLVEFUNC(DSA_free)
1140 
1141  RESOLVEFUNC(RSA_new)
1142  RESOLVEFUNC(RSA_free)
1143 
1144  RESOLVEFUNC(DH_bits)
1145  RESOLVEFUNC(DSA_bits)
1146  RESOLVEFUNC(RSA_bits)
1147 
1148 #ifndef OPENSSL_NO_EC
1149 
1150  RESOLVEFUNC(EVP_PKEY_set1_EC_KEY)
1151  RESOLVEFUNC(EVP_PKEY_get1_EC_KEY)
1152  RESOLVEFUNC(PEM_read_bio_EC_PUBKEY)
1153  RESOLVEFUNC(PEM_read_bio_ECPrivateKey)
1154  RESOLVEFUNC(PEM_write_bio_EC_PUBKEY)
1155  RESOLVEFUNC(PEM_write_bio_ECPrivateKey)
1156  RESOLVEFUNC(EC_KEY_get0_group)
1157  RESOLVEFUNC(EC_GROUP_get_degree)
1158  RESOLVEFUNC(EC_KEY_dup)
1159  RESOLVEFUNC(EC_KEY_new_by_curve_name)
1160  RESOLVEFUNC(EC_KEY_free)
1161 
1162 #endif // OPENSSL_NO_EC
1163 
1164 #endif // OPENSSL_NO_DEPRECATED_3_0
1165 
1166  RESOLVEFUNC(SSL_get_verify_result)
1167  RESOLVEFUNC(SSL_new)
1168  RESOLVEFUNC(SSL_get_SSL_CTX)
1169  RESOLVEFUNC(SSL_ctrl)
1170  RESOLVEFUNC(SSL_read)
1171  RESOLVEFUNC(SSL_set_accept_state)
1172  RESOLVEFUNC(SSL_set_bio)
1173  RESOLVEFUNC(SSL_set_connect_state)
1174  RESOLVEFUNC(SSL_shutdown)
1175  RESOLVEFUNC(SSL_in_init)
1176  RESOLVEFUNC(SSL_get_shutdown)
1177  RESOLVEFUNC(SSL_set_session)
1178  RESOLVEFUNC(SSL_SESSION_free)
1179  RESOLVEFUNC(SSL_get1_session)
1180  RESOLVEFUNC(SSL_get_session)
1181  RESOLVEFUNC(SSL_set_ex_data)
1182  RESOLVEFUNC(SSL_get_ex_data)
1183  RESOLVEFUNC(SSL_get_ex_data_X509_STORE_CTX_idx)
1184 
1185 #ifndef OPENSSL_NO_PSK
1186  RESOLVEFUNC(SSL_set_psk_client_callback)
1187  RESOLVEFUNC(SSL_set_psk_server_callback)
1188  RESOLVEFUNC(SSL_CTX_use_psk_identity_hint)
1189 #endif // !OPENSSL_NO_PSK
1190 
1191  RESOLVEFUNC(SSL_write)
1192  RESOLVEFUNC(X509_NAME_entry_count)
1193  RESOLVEFUNC(X509_NAME_get_entry)
1194  RESOLVEFUNC(X509_NAME_ENTRY_get_data)
1195  RESOLVEFUNC(X509_NAME_ENTRY_get_object)
1196  RESOLVEFUNC(X509_PUBKEY_get)
1197  RESOLVEFUNC(X509_STORE_free)
1198  RESOLVEFUNC(X509_STORE_new)
1199  RESOLVEFUNC(X509_STORE_add_cert)
1200  RESOLVEFUNC(X509_STORE_CTX_free)
1201  RESOLVEFUNC(X509_STORE_CTX_init)
1202  RESOLVEFUNC(X509_STORE_CTX_new)
1203  RESOLVEFUNC(X509_STORE_CTX_set_purpose)
1204  RESOLVEFUNC(X509_STORE_CTX_get_error)
1205  RESOLVEFUNC(X509_STORE_CTX_get_error_depth)
1206  RESOLVEFUNC(X509_STORE_CTX_get_current_cert)
1207  RESOLVEFUNC(X509_STORE_CTX_get0_store)
1208  RESOLVEFUNC(X509_cmp)
1209  RESOLVEFUNC(X509_STORE_CTX_get_ex_data)
1210  RESOLVEFUNC(X509_dup)
1211  RESOLVEFUNC(X509_print)
1212  RESOLVEFUNC(X509_digest)
1213  RESOLVEFUNC(X509_EXTENSION_get_object)
1214  RESOLVEFUNC(X509_free)
1215  RESOLVEFUNC(X509_gmtime_adj)
1216  RESOLVEFUNC(ASN1_TIME_free)
1217  RESOLVEFUNC(X509_get_ext)
1218  RESOLVEFUNC(X509_get_ext_count)
1219  RESOLVEFUNC(X509_get_ext_d2i)
1220  RESOLVEFUNC(X509V3_EXT_get)
1221  RESOLVEFUNC(X509V3_EXT_d2i)
1222  RESOLVEFUNC(X509_EXTENSION_get_critical)
1223  RESOLVEFUNC(X509_EXTENSION_get_data)
1224  RESOLVEFUNC(BASIC_CONSTRAINTS_free)
1225  RESOLVEFUNC(AUTHORITY_KEYID_free)
1226  RESOLVEFUNC(GENERAL_NAME_free)
1227  RESOLVEFUNC(ASN1_STRING_print)
1228  RESOLVEFUNC(X509_check_issued)
1229  RESOLVEFUNC(X509_get_issuer_name)
1230  RESOLVEFUNC(X509_get_subject_name)
1231  RESOLVEFUNC(X509_get_serialNumber)
1232  RESOLVEFUNC(X509_verify_cert)
1233  RESOLVEFUNC(d2i_X509)
1234  RESOLVEFUNC(i2d_X509)
1235 #if OPENSSL_VERSION_MAJOR < 3
1236  RESOLVEFUNC(SSL_CTX_load_verify_locations)
1237 #else
1238  RESOLVEFUNC(SSL_CTX_load_verify_dir)
1239 #endif // OPENSSL_VERSION_MAJOR
1240  RESOLVEFUNC(i2d_SSL_SESSION)
1241  RESOLVEFUNC(d2i_SSL_SESSION)
1242 
1243 #ifndef OPENSSL_NO_NEXTPROTONEG
1244  RESOLVEFUNC(SSL_select_next_proto)
1246  RESOLVEFUNC(SSL_get0_next_proto_negotiated)
1248  RESOLVEFUNC(SSL_CTX_set_alpn_select_cb)
1250 #endif // !OPENSSL_NO_NEXTPROTONEG
1251 
1252 #if QT_CONFIG(dtls)
1253  RESOLVEFUNC(SSL_CTX_set_cookie_generate_cb)
1254  RESOLVEFUNC(SSL_CTX_set_cookie_verify_cb)
1255  RESOLVEFUNC(DTLS_server_method)
1256  RESOLVEFUNC(DTLS_client_method)
1257 #endif // dtls
1258 
1259  RESOLVEFUNC(CRYPTO_malloc)
1260  RESOLVEFUNC(DH_new)
1261  RESOLVEFUNC(DH_free)
1262  RESOLVEFUNC(d2i_DHparams)
1263  RESOLVEFUNC(i2d_DHparams)
1264  RESOLVEFUNC(DH_check)
1265  RESOLVEFUNC(BN_bin2bn)
1266 
1267 #ifndef OPENSSL_NO_EC
1268  RESOLVEFUNC(EC_get_builtin_curves)
1269 #endif // OPENSSL_NO_EC
1270 
1271  RESOLVEFUNC(PKCS12_parse)
1272  RESOLVEFUNC(d2i_PKCS12_bio)
1273  RESOLVEFUNC(PKCS12_free)
1274 
1275  symbolsResolved.storeRelease(true);
1276  return true;
1277 }
1278 #endif // QT_CONFIG(library)
1279 
1280 #else // !defined QT_LINKED_OPENSSL
1281 
1283 {
1284 #ifdef QT_NO_OPENSSL
1285  return false;
1286 #endif
1287  return true;
1288 }
1289 #endif // !defined QT_LINKED_OPENSSL
1290 
sizeof(AF_ModuleRec)
FT_UInt idx
Definition: cffcmap.c:135
T loadAcquire() const noexcept
Definition: qbasicatomic.h:93
void storeRelease(T newValue) noexcept
Definition: qbasicatomic.h:94
T loadRelaxed() const noexcept
Definition: qbasicatomic.h:90
The QByteArray class provides an array of bytes.
Definition: qbytearray.h:85
The QDir class provides access to directory structures and their contents.
Definition: qdir.h:55
@ Files
Definition: qdir.h:58
The QFileInfo class provides system-independent file information.
Definition: qfileinfo.h:57
QString completeSuffix() const
Definition: qfileinfo.cpp:854
QString absolutePath() const
Definition: qfileinfo.cpp:599
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal.
Definition: qstring.h:84
The QLibrary class loads shared libraries at runtime.
Definition: qlibrary.h:53
bool load()
Definition: qlibrary.cpp:810
@ ExportExternalSymbolsHint
Definition: qlibrary.h:60
void setFileNameAndVersion(const QString &fileName, int verNum)
Definition: qlibrary.cpp:973
bool unload()
Definition: qlibrary.cpp:836
void setLoadHints(LoadHints hints)
Definition: qlibrary.cpp:1142
The QMutex class provides access serialization between threads.
Definition: qmutex.h:285
The QMutexLocker class is a convenience class that simplifies locking and unlocking mutexes.
Definition: qmutex.h:317
The QString class provides a Unicode character string.
Definition: qstring.h:388
static QString fromLatin1(QByteArrayView ba)
Definition: qstring.cpp:5488
QStringList split(const QString &sep, Qt::SplitBehavior behavior=Qt::KeepEmptyParts, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Definition: qstring.cpp:7672
static QString fromLocal8Bit(QByteArrayView ba)
Definition: qstring.cpp:5563
The QStringList class provides a list of strings.
The QStringView class provides a unified view on UTF-16 strings with a read-only subset of the QStrin...
Definition: qstringview.h:122
Q_CORE_EXPORT QList< QStringView > split(QStringView sep, Qt::SplitBehavior behavior=Qt::KeepEmptyParts, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Definition: qstring.cpp:7702
int toInt(bool *ok=nullptr, int base=10) const
Definition: qstring.h:1176
The QUrl class provides a convenient interface for working with URLs.
Definition: qurl.h:130
QUrl resolved(const QUrl &relative) const
Definition: qurl.cpp:2745
QString path(ComponentFormattingOptions options=FullyDecoded) const
Definition: qurl.cpp:2488
QString str
[2]
double e
int const char * version
Definition: zlib.h:814
#define TRUE
Definition: ftobjs.h:53
#define FALSE
Definition: ftobjs.h:57
constexpr T & operator()(T &v) const
Definition: hb-algs.hh:2
auto it unsigned count const
Definition: hb-iter.hh:848
backing_store_ptr info
[4]
Definition: jmemsys.h:161
QRhiTextureRenderTarget * rt
Definition: mrt.cpp:84
void qsslSocketUnresolvedSymbolWarning(const char *functionName)
@ SkipEmptyParts
Definition: qnamespace.h:153
#define QString()
Definition: parse-defines.h:51
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro vuzp8 reg2 vuzp d d &reg2 endm macro vzip8 reg2 vzip d d &reg2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld[DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld init[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp skip1 beq endif SRC MASK if dst_r_bpp DST_R else add endif PF add sub src_basereg pixdeinterleave mask_basereg pixdeinterleave dst_r_basereg process_pixblock_head pixblock_size cache_preload_simple process_pixblock_tail pixinterleave dst_w_basereg irp beq endif process_pixblock_tail_head tst beq irp if pixblock_size chunk_size tst beq pixld SRC pixld MASK if DST_R else pixld DST_R endif if src_basereg pixdeinterleave mask_basereg pixdeinterleave dst_r_basereg process_pixblock_head if pixblock_size cache_preload_simple endif process_pixblock_tail pixinterleave dst_w_basereg irp if pixblock_size chunk_size tst beq if DST_W else pixst DST_W else mov ORIG_W endif add lsl if lsl endif if lsl endif lsl endif lsl endif lsl endif subs mov DST_W if regs_shortage str endif bge start_of_loop_label endm macro generate_composite_function
set set set set set set set macro pixldst1 op
void
Definition: png.h:1080
#define Q_BASIC_ATOMIC_INITIALIZER(a)
EGLOutputLayerEXT EGLint EGLAttrib value
#define qCWarning(category,...)
GLenum GLuint GLenum GLsizei length
Definition: qopengl.h:270
GLenum type
Definition: qopengl.h:270
GLboolean GLboolean GLboolean b
GLint GLint GLint GLint GLint x
[0]
GLenum GLuint GLint level
GLuint64 key
GLboolean r
[2]
GLfloat GLfloat GLfloat w
[0]
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLfloat GLfloat f
GLsizei const GLuint * paths
GLenum GLenum dst
GLbitfield flags
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLboolean GLboolean g
GLuint name
GLfloat n
const GLubyte * c
Definition: qopenglext.h:12701
GLuint GLfloat * val
Definition: qopenglext.h:1513
GLuint entry
Definition: qopenglext.h:11002
GLenum GLsizei len
Definition: qopenglext.h:3292
GLdouble GLdouble t
[9]
Definition: qopenglext.h:243
GLuint in
Definition: qopenglext.h:8870
GLdouble GLdouble GLdouble GLdouble q
Definition: qopenglext.h:259
GLsizei const GLchar *const * path
Definition: qopenglext.h:4283
GLuint64EXT * result
[6]
Definition: qopenglext.h:10932
GLdouble s
[6]
Definition: qopenglext.h:235
GLfloat GLfloat p
[1]
Definition: qopenglext.h:12698
GLuint num
Definition: qopenglext.h:5654
#define Q_ASSERT(cond)
Definition: qrandom.cpp:84
SSL_CTX int(*) void arg)
bool q_resolveOpenSslSymbols()
DEFINEFUNC2(void, OPENSSL_sk_pop_free, OPENSSL_STACK *a, a, void(*b)(void *), b, return, DUMMYARG) using info_callback
DEFINEFUNC6(int, SSL_select_next_proto, unsigned char **out, out, unsigned char *outlen, outlen, const unsigned char *in, in, unsigned int inlen, inlen, const unsigned char *client, client, unsigned int client_len, client_len, return -1, return) DEFINEFUNC3(void
SSL_CTX int(* cb)(SSL *ssl, unsigned char **out, unsigned char *outlen, const unsigned char *in, unsigned int inlen, void *arg)
SSL_CTX int(*) void DUMMYAR SSL_set_alpn_protos)
SSL_CTX int(*) void DUMMYARG SSL const unsigned char protos)
#define RESOLVEFUNC(func)
DEFINEFUNC(void, SSL_CONF_CTX_free, SSL_CONF_CTX *a, a, return, return)
SSL_CTX int(*) void DUMMYAR DEFINEFUNC3)(void, SSL_get0_next_proto_negotiated, const SSL *s, s, const unsigned char **data, data, unsigned *len, len, return, DUMMYARG) DEFINEFUNC3(int
SSL_CTX int(*) void DUMMYARG SSL const unsigned char unsigned retur SSL_get0_alpn_selected)
SSL_CTX int(*) void DUMMYARG SSL const unsigned char unsigned return const SSL const unsigned char unsigned DUMMYAR DEFINEFUNC5)(int, PKCS12_parse, PKCS12 *p12, p12, const char *pass, pass, EVP_PKEY **pkey, pkey, X509 **cert, cert, STACK_OF(X509) **ca, ca, return 1, return)
SSL_CTX_set_next_proto_select_cb
SSL_CTX int(*) void DUMMYARG SSL const unsigned char unsigne protos_len)
#define DEFINEFUNC4(ret, func, arg1, a, arg2, b, arg3, c, arg4, d, err, funcret)
unsigned int(* q_psk_server_callback_t)(SSL *ssl, const char *identity, unsigned char *psk, unsigned int max_psk_len)
void(* GenericCallbackType)()
#define DEFINEFUNC7(ret, func, arg1, a, arg2, b, arg3, c, arg4, d, arg5, e, arg6, f, arg7, g, err, funcret)
int(* q_SSL_psk_use_session_cb_func_t)(SSL *, const EVP_MD *, const unsigned char **, size_t *, SSL_SESSION **)
STACK_OF(X509) *q_X509_STORE_CTX_get0_chain(X509_STORE_CTX *ctx)
unsigned int(* q_psk_client_callback_t)(SSL *ssl, const char *hint, char *identity, unsigned int max_identity_len, unsigned char *psk, unsigned int max_psk_len)
long q_OpenSSL_version_num()
QFile file
[0]
QFileInfo fi("c:/temp/foo")
[newstuff]
gzip write("uncompressed data")
QSettings settings("MySoft", "Star Runner")
[0]
QTextStream out(stdout)
[7]
QString dir
[11]
const QStringList filters({"Image files (*.png *.xpm *.jpg)", "Text files (*.txt)", "Any files (*)" })
[6]
QList< QSslCertificate > cert
[0]
const auto certs
[1]
QStringList::Iterator it
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
Definition: qchar.h:53
#define rhs
#define free_func
Definition: zconf.h:149