1 | // Copyright (C) 2017 The Qt Company Ltd. |
2 | // Copyright (C) 2014 BlackBerry Limited. All rights reserved. |
3 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
4 | |
5 | /**************************************************************************** |
6 | ** |
7 | ** In addition, as a special exception, the copyright holders listed above give |
8 | ** permission to link the code of its release of Qt with the OpenSSL project's |
9 | ** "OpenSSL" library (or modified versions of the "OpenSSL" library that use the |
10 | ** same license as the original version), and distribute the linked executables. |
11 | ** |
12 | ** You must comply with the GNU General Public License version 2 in all |
13 | ** respects for all of the code used other than the "OpenSSL" code. If you |
14 | ** modify this file, you may extend this exception to your version of the file, |
15 | ** but you are not obligated to do so. If you do not wish to do so, delete |
16 | ** this exception statement from your version of this file. |
17 | ** |
18 | ****************************************************************************/ |
19 | |
20 | #ifndef QSSLSOCKET_OPENSSL_SYMBOLS_P_H |
21 | #define QSSLSOCKET_OPENSSL_SYMBOLS_P_H |
22 | |
23 | |
24 | // |
25 | // W A R N I N G |
26 | // ------------- |
27 | // |
28 | // This file is not part of the Qt API. It exists purely as an |
29 | // implementation detail. This header file may change from version to |
30 | // version without notice, or even be removed. |
31 | // |
32 | // We mean it. |
33 | // |
34 | |
35 | #include <QtNetwork/private/qtnetworkglobal_p.h> |
36 | |
37 | #include "qopenssl_p.h" |
38 | |
39 | #include <QtCore/qglobal.h> |
40 | |
41 | #if QT_CONFIG(ocsp) |
42 | #include <QtNetwork/private/qocsp_p.h> |
43 | #endif |
44 | |
45 | QT_BEGIN_NAMESPACE |
46 | |
47 | #define DUMMYARG |
48 | |
49 | #if !defined QT_LINKED_OPENSSL |
50 | // **************** Shared declarations ****************** |
51 | // ret func(arg) |
52 | |
53 | # define DEFINEFUNC(ret, func, arg, a, err, funcret) \ |
54 | typedef ret (*_q_PTR_##func)(arg); \ |
55 | static _q_PTR_##func _q_##func = nullptr; \ |
56 | ret q_##func(arg) { \ |
57 | if (Q_UNLIKELY(!_q_##func)) { \ |
58 | qsslSocketUnresolvedSymbolWarning(#func); \ |
59 | err; \ |
60 | } \ |
61 | funcret _q_##func(a); \ |
62 | } |
63 | |
64 | // ret func(arg1, arg2) |
65 | # define DEFINEFUNC2(ret, func, arg1, a, arg2, b, err, funcret) \ |
66 | typedef ret (*_q_PTR_##func)(arg1, arg2); \ |
67 | static _q_PTR_##func _q_##func = nullptr; \ |
68 | ret q_##func(arg1, arg2) { \ |
69 | if (Q_UNLIKELY(!_q_##func)) { \ |
70 | qsslSocketUnresolvedSymbolWarning(#func);\ |
71 | err; \ |
72 | } \ |
73 | funcret _q_##func(a, b); \ |
74 | } |
75 | |
76 | // ret func(arg1, arg2, arg3) |
77 | # define DEFINEFUNC3(ret, func, arg1, a, arg2, b, arg3, c, err, funcret) \ |
78 | typedef ret (*_q_PTR_##func)(arg1, arg2, arg3); \ |
79 | static _q_PTR_##func _q_##func = nullptr; \ |
80 | ret q_##func(arg1, arg2, arg3) { \ |
81 | if (Q_UNLIKELY(!_q_##func)) { \ |
82 | qsslSocketUnresolvedSymbolWarning(#func); \ |
83 | err; \ |
84 | } \ |
85 | funcret _q_##func(a, b, c); \ |
86 | } |
87 | |
88 | // ret func(arg1, arg2, arg3, arg4) |
89 | # define DEFINEFUNC4(ret, func, arg1, a, arg2, b, arg3, c, arg4, d, err, funcret) \ |
90 | typedef ret (*_q_PTR_##func)(arg1, arg2, arg3, arg4); \ |
91 | static _q_PTR_##func _q_##func = nullptr; \ |
92 | ret q_##func(arg1, arg2, arg3, arg4) { \ |
93 | if (Q_UNLIKELY(!_q_##func)) { \ |
94 | qsslSocketUnresolvedSymbolWarning(#func); \ |
95 | err; \ |
96 | } \ |
97 | funcret _q_##func(a, b, c, d); \ |
98 | } |
99 | |
100 | // ret func(arg1, arg2, arg3, arg4, arg5) |
101 | # define DEFINEFUNC5(ret, func, arg1, a, arg2, b, arg3, c, arg4, d, arg5, e, err, funcret) \ |
102 | typedef ret (*_q_PTR_##func)(arg1, arg2, arg3, arg4, arg5); \ |
103 | static _q_PTR_##func _q_##func = nullptr; \ |
104 | ret q_##func(arg1, arg2, arg3, arg4, arg5) { \ |
105 | if (Q_UNLIKELY(!_q_##func)) { \ |
106 | qsslSocketUnresolvedSymbolWarning(#func); \ |
107 | err; \ |
108 | } \ |
109 | funcret _q_##func(a, b, c, d, e); \ |
110 | } |
111 | |
112 | // ret func(arg1, arg2, arg3, arg4, arg6) |
113 | # define DEFINEFUNC6(ret, func, arg1, a, arg2, b, arg3, c, arg4, d, arg5, e, arg6, f, err, funcret) \ |
114 | typedef ret (*_q_PTR_##func)(arg1, arg2, arg3, arg4, arg5, arg6); \ |
115 | static _q_PTR_##func _q_##func = nullptr; \ |
116 | ret q_##func(arg1, arg2, arg3, arg4, arg5, arg6) { \ |
117 | if (Q_UNLIKELY(!_q_##func)) { \ |
118 | qsslSocketUnresolvedSymbolWarning(#func); \ |
119 | err; \ |
120 | } \ |
121 | funcret _q_##func(a, b, c, d, e, f); \ |
122 | } |
123 | |
124 | // ret func(arg1, arg2, arg3, arg4, arg6, arg7) |
125 | # define DEFINEFUNC7(ret, func, arg1, a, arg2, b, arg3, c, arg4, d, arg5, e, arg6, f, arg7, g, err, funcret) \ |
126 | typedef ret (*_q_PTR_##func)(arg1, arg2, arg3, arg4, arg5, arg6, arg7); \ |
127 | static _q_PTR_##func _q_##func = nullptr; \ |
128 | ret q_##func(arg1, arg2, arg3, arg4, arg5, arg6, arg7) { \ |
129 | if (Q_UNLIKELY(!_q_##func)) { \ |
130 | qsslSocketUnresolvedSymbolWarning(#func); \ |
131 | err; \ |
132 | } \ |
133 | funcret _q_##func(a, b, c, d, e, f, g); \ |
134 | } |
135 | |
136 | // ret func(arg1, arg2, arg3, arg4, arg6, arg7, arg8, arg9) |
137 | # define DEFINEFUNC9(ret, func, arg1, a, arg2, b, arg3, c, arg4, d, arg5, e, arg6, f, arg7, g, arg8, h, arg9, i, err, funcret) \ |
138 | typedef ret (*_q_PTR_##func)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); \ |
139 | static _q_PTR_##func _q_##func = nullptr; \ |
140 | ret q_##func(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { \ |
141 | if (Q_UNLIKELY(!_q_##func)) { \ |
142 | qsslSocketUnresolvedSymbolWarning(#func); \ |
143 | err; \ |
144 | } \ |
145 | funcret _q_##func(a, b, c, d, e, f, g, h, i); \ |
146 | } |
147 | // **************** Shared declarations ****************** |
148 | |
149 | #else // !defined QT_LINKED_OPENSSL |
150 | |
151 | // **************** Static declarations ****************** |
152 | |
153 | // ret func(arg) |
154 | # define DEFINEFUNC(ret, func, arg, a, err, funcret) \ |
155 | ret q_##func(arg) { funcret func(a); } |
156 | |
157 | // ret func(arg1, arg2) |
158 | # define DEFINEFUNC2(ret, func, arg1, a, arg2, b, err, funcret) \ |
159 | ret q_##func(arg1, arg2) { funcret func(a, b); } |
160 | |
161 | // ret func(arg1, arg2, arg3) |
162 | # define DEFINEFUNC3(ret, func, arg1, a, arg2, b, arg3, c, err, funcret) \ |
163 | ret q_##func(arg1, arg2, arg3) { funcret func(a, b, c); } |
164 | |
165 | // ret func(arg1, arg2, arg3, arg4) |
166 | # define DEFINEFUNC4(ret, func, arg1, a, arg2, b, arg3, c, arg4, d, err, funcret) \ |
167 | ret q_##func(arg1, arg2, arg3, arg4) { funcret func(a, b, c, d); } |
168 | |
169 | // ret func(arg1, arg2, arg3, arg4, arg5) |
170 | # define DEFINEFUNC5(ret, func, arg1, a, arg2, b, arg3, c, arg4, d, arg5, e, err, funcret) \ |
171 | ret q_##func(arg1, arg2, arg3, arg4, arg5) { funcret func(a, b, c, d, e); } |
172 | |
173 | // ret func(arg1, arg2, arg3, arg4, arg6) |
174 | # define DEFINEFUNC6(ret, func, arg1, a, arg2, b, arg3, c, arg4, d, arg5, e, arg6, f, err, funcret) \ |
175 | ret q_##func(arg1, arg2, arg3, arg4, arg5, arg6) { funcret func(a, b, c, d, e, f); } |
176 | |
177 | // ret func(arg1, arg2, arg3, arg4, arg6, arg7) |
178 | # define DEFINEFUNC7(ret, func, arg1, a, arg2, b, arg3, c, arg4, d, arg5, e, arg6, f, arg7, g, err, funcret) \ |
179 | ret q_##func(arg1, arg2, arg3, arg4, arg5, arg6, arg7) { funcret func(a, b, c, d, e, f, g); } |
180 | |
181 | // ret func(arg1, arg2, arg3, arg4, arg6, arg7, arg8, arg9) |
182 | # define DEFINEFUNC9(ret, func, arg1, a, arg2, b, arg3, c, arg4, d, arg5, e, arg6, f, arg7, g, arg8, h, arg9, i, err, funcret) \ |
183 | ret q_##func(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { funcret func(a, b, c, d, e, f, g, h, i); } |
184 | |
185 | // **************** Static declarations ****************** |
186 | |
187 | #endif // !defined QT_LINKED_OPENSSL |
188 | #if defined(OPENSSL_VERSION_MAJOR) && OPENSSL_VERSION_MAJOR >= 3 |
189 | typedef uint64_t qssloptions; |
190 | #else |
191 | typedef unsigned long qssloptions; |
192 | #endif |
193 | // TODO: the following lines previously were a part of 1.1 - specific header. |
194 | // To reduce the amount of the change, I'm directly copying and pasting the |
195 | // content of the header here. Later, can be better sorted/split into groups, |
196 | // depending on the functionality. |
197 | |
198 | const unsigned char * q_ASN1_STRING_get0_data(const ASN1_STRING *x); |
199 | |
200 | BIO *q_BIO_new(const BIO_METHOD *a); |
201 | const BIO_METHOD *q_BIO_s_mem(); |
202 | |
203 | void q_AUTHORITY_INFO_ACCESS_free(AUTHORITY_INFO_ACCESS *a); |
204 | int q_EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *c); |
205 | int q_EVP_PKEY_up_ref(EVP_PKEY *a); |
206 | EVP_PKEY_CTX *q_EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e); |
207 | void q_EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx); |
208 | int q_EVP_PKEY_param_check(EVP_PKEY_CTX *ctx); |
209 | int q_OPENSSL_sk_num(OPENSSL_STACK *a); |
210 | void q_OPENSSL_sk_pop_free(OPENSSL_STACK *a, void (*b)(void *)); |
211 | OPENSSL_STACK *q_OPENSSL_sk_new_null(); |
212 | void q_OPENSSL_sk_push(OPENSSL_STACK *st, void *data); |
213 | void q_OPENSSL_sk_free(OPENSSL_STACK *a); |
214 | void * q_OPENSSL_sk_value(OPENSSL_STACK *a, int b); |
215 | int q_SSL_session_reused(SSL *a); |
216 | qssloptions q_SSL_CTX_set_options(SSL_CTX *ctx, qssloptions op); |
217 | int q_OPENSSL_init_ssl(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings); |
218 | size_t q_SSL_get_client_random(SSL *a, unsigned char *out, size_t outlen); |
219 | size_t q_SSL_SESSION_get_master_key(const SSL_SESSION *session, unsigned char *out, size_t outlen); |
220 | int q_CRYPTO_get_ex_new_index(int class_index, long argl, void *argp, CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); |
221 | const SSL_METHOD *q_TLS_method(); |
222 | const SSL_METHOD *q_TLS_client_method(); |
223 | const SSL_METHOD *q_TLS_server_method(); |
224 | ASN1_TIME *q_X509_getm_notBefore(X509 *a); |
225 | ASN1_TIME *q_X509_getm_notAfter(X509 *a); |
226 | void q_ASN1_item_free(ASN1_VALUE *val, const ASN1_ITEM *it); |
227 | void q_X509V3_conf_free(CONF_VALUE *val); |
228 | |
229 | void q_X509_up_ref(X509 *a); |
230 | long q_X509_get_version(X509 *a); |
231 | EVP_PKEY *q_X509_get_pubkey(X509 *a); |
232 | void q_X509_STORE_set_verify_cb(X509_STORE *ctx, X509_STORE_CTX_verify_cb verify_cb); |
233 | int q_X509_STORE_set_ex_data(X509_STORE *ctx, int idx, void *data); |
234 | void *q_X509_STORE_get_ex_data(X509_STORE *r, int idx); |
235 | STACK_OF(X509) *q_X509_STORE_CTX_get0_chain(X509_STORE_CTX *ctx); |
236 | |
237 | # define q_SSL_load_error_strings() q_OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS \ |
238 | | OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL) |
239 | |
240 | #define q_SKM_sk_num(st) q_OPENSSL_sk_num((OPENSSL_STACK *)st) |
241 | #define q_SKM_sk_value(type, st,i) (type *)q_OPENSSL_sk_value((OPENSSL_STACK *)st, i) |
242 | |
243 | #define q_OPENSSL_add_all_algorithms_conf() q_OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS \ |
244 | | OPENSSL_INIT_ADD_ALL_DIGESTS \ |
245 | | OPENSSL_INIT_LOAD_CONFIG, NULL) |
246 | #define q_OPENSSL_add_all_algorithms_noconf() q_OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS \ |
247 | | OPENSSL_INIT_ADD_ALL_DIGESTS, NULL) |
248 | |
249 | int q_OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings); |
250 | |
251 | long q_OpenSSL_version_num(); |
252 | const char *q_OpenSSL_version(int type); |
253 | |
254 | unsigned long q_SSL_SESSION_get_ticket_lifetime_hint(const SSL_SESSION *session); |
255 | unsigned long q_SSL_set_options(SSL *s, unsigned long op); |
256 | |
257 | #ifdef TLS1_3_VERSION |
258 | int q_SSL_CTX_set_ciphersuites(SSL_CTX *ctx, const char *str); |
259 | |
260 | // The functions below do not really have to be ifdefed like this, but for now |
261 | // they only used in TLS 1.3 handshake (and probably future versions). |
262 | // Plus, 'is resumalbe' is OpenSSL 1.1.1-only (and again we need it for |
263 | // TLS 1.3-specific session management). |
264 | |
265 | extern "C" |
266 | { |
267 | using NewSessionCallback = int (*)(SSL *, SSL_SESSION *); |
268 | } |
269 | |
270 | void q_SSL_CTX_sess_set_new_cb(SSL_CTX *ctx, NewSessionCallback cb); |
271 | int q_SSL_SESSION_is_resumable(const SSL_SESSION *s); |
272 | |
273 | #define q_SSL_CTX_set_session_cache_mode(ctx,m) \ |
274 | q_SSL_CTX_ctrl(ctx,SSL_CTRL_SET_SESS_CACHE_MODE,m,NULL) |
275 | |
276 | #endif |
277 | |
278 | #if QT_CONFIG(dtls) |
279 | // Functions and types required for DTLS support: |
280 | extern "C" |
281 | { |
282 | |
283 | typedef int (*CookieVerifyCallback)(SSL *, const unsigned char *, unsigned); |
284 | typedef int (*DgramWriteCallback) (BIO *, const char *, int); |
285 | typedef int (*DgramReadCallback) (BIO *, char *, int); |
286 | typedef int (*DgramPutsCallback) (BIO *, const char *); |
287 | typedef long (*DgramCtrlCallback) (BIO *, int, long, void *); |
288 | typedef int (*DgramCreateCallback) (BIO *); |
289 | typedef int (*DgramDestroyCallback) (BIO *); |
290 | |
291 | } |
292 | |
293 | int q_DTLSv1_listen(SSL *s, BIO_ADDR *client); |
294 | BIO_ADDR *q_BIO_ADDR_new(); |
295 | void q_BIO_ADDR_free(BIO_ADDR *ap); |
296 | |
297 | // API we need for a custom dgram BIO: |
298 | |
299 | BIO_METHOD *q_BIO_meth_new(int type, const char *name); |
300 | void q_BIO_meth_free(BIO_METHOD *biom); |
301 | int q_BIO_meth_set_write(BIO_METHOD *biom, DgramWriteCallback); |
302 | int q_BIO_meth_set_read(BIO_METHOD *biom, DgramReadCallback); |
303 | int q_BIO_meth_set_puts(BIO_METHOD *biom, DgramPutsCallback); |
304 | int q_BIO_meth_set_ctrl(BIO_METHOD *biom, DgramCtrlCallback); |
305 | int q_BIO_meth_set_create(BIO_METHOD *biom, DgramCreateCallback); |
306 | int q_BIO_meth_set_destroy(BIO_METHOD *biom, DgramDestroyCallback); |
307 | |
308 | #endif // dtls |
309 | |
310 | void q_BIO_set_data(BIO *a, void *ptr); |
311 | void *q_BIO_get_data(BIO *a); |
312 | void q_BIO_set_init(BIO *a, int init); |
313 | int q_BIO_get_shutdown(BIO *a); |
314 | void q_BIO_set_shutdown(BIO *a, int shut); |
315 | |
316 | #if QT_CONFIG(ocsp) |
317 | const OCSP_CERTID *q_OCSP_SINGLERESP_get0_id(const OCSP_SINGLERESP *x); |
318 | #endif // ocsp |
319 | |
320 | #define q_SSL_CTX_set_min_proto_version(ctx, version) \ |
321 | q_SSL_CTX_ctrl(ctx, SSL_CTRL_SET_MIN_PROTO_VERSION, version, nullptr) |
322 | |
323 | #define q_SSL_CTX_set_max_proto_version(ctx, version) \ |
324 | q_SSL_CTX_ctrl(ctx, SSL_CTRL_SET_MAX_PROTO_VERSION, version, nullptr) |
325 | |
326 | extern "C" { |
327 | typedef int (*q_SSL_psk_use_session_cb_func_t)(SSL *, const EVP_MD *, const unsigned char **, size_t *, |
328 | SSL_SESSION **); |
329 | } |
330 | void q_SSL_set_psk_use_session_callback(SSL *s, q_SSL_psk_use_session_cb_func_t); |
331 | // Here the content of the 1.1 header ends. |
332 | |
333 | bool q_resolveOpenSslSymbols(); |
334 | long q_ASN1_INTEGER_get(ASN1_INTEGER *a); |
335 | int q_ASN1_INTEGER_cmp(const ASN1_INTEGER *x, const ASN1_INTEGER *y); |
336 | int q_ASN1_STRING_length(ASN1_STRING *a); |
337 | int q_ASN1_STRING_to_UTF8(unsigned char **a, ASN1_STRING *b); |
338 | int q_ASN1_TIME_to_tm(const ASN1_TIME *s, struct tm *tm); |
339 | long q_BIO_ctrl(BIO *a, int b, long c, void *d); |
340 | int q_BIO_free(BIO *a); |
341 | BIO *q_BIO_new_mem_buf(void *a, int b); |
342 | int q_BIO_read(BIO *a, void *b, int c); |
343 | int q_BIO_write(BIO *a, const void *b, int c); |
344 | int q_BN_num_bits(const BIGNUM *a); |
345 | int q_BN_is_word(BIGNUM *a, BN_ULONG w); |
346 | BN_ULONG q_BN_mod_word(const BIGNUM *a, BN_ULONG w); |
347 | |
348 | X509 *q_d2i_X509(X509 **a, const unsigned char **b, long c); |
349 | char *q_ERR_error_string(unsigned long a, char *b); |
350 | void q_ERR_error_string_n(unsigned long e, char *buf, size_t len); |
351 | unsigned long q_ERR_get_error(); |
352 | EVP_CIPHER_CTX *q_EVP_CIPHER_CTX_new(); |
353 | void q_EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *a); |
354 | int q_EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr); |
355 | int q_EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *x, int keylen); |
356 | int q_EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, const unsigned char *key, const unsigned char *iv, int enc); |
357 | int q_EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl, const unsigned char *key, const unsigned char *iv, int enc); |
358 | int q_EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, const unsigned char *in, int inl); |
359 | int q_EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl); |
360 | const EVP_MD *q_EVP_get_digestbyname(const char *name); |
361 | |
362 | #ifndef OPENSSL_NO_DES |
363 | const EVP_CIPHER *q_EVP_des_cbc(); |
364 | const EVP_CIPHER *q_EVP_des_ede3_cbc(); |
365 | #endif // OPENSSL_NO_DES |
366 | |
367 | #ifndef OPENSSL_NO_RC2 |
368 | const EVP_CIPHER *q_EVP_rc2_cbc(); |
369 | #endif // OPENSSL_NO_RC2 |
370 | |
371 | #ifndef OPENSSL_NO_AES |
372 | const EVP_CIPHER *q_EVP_aes_128_cbc(); |
373 | const EVP_CIPHER *q_EVP_aes_192_cbc(); |
374 | const EVP_CIPHER *q_EVP_aes_256_cbc(); |
375 | #endif // OPENSSL_NO_AES |
376 | |
377 | const EVP_MD *q_EVP_sha1(); |
378 | |
379 | void q_EVP_PKEY_free(EVP_PKEY *a); |
380 | int q_EVP_PKEY_type(int a); |
381 | EVP_PKEY *q_EVP_PKEY_new(); |
382 | int q_i2d_X509(X509 *a, unsigned char **b); |
383 | const char *q_OBJ_nid2sn(int a); |
384 | const char *q_OBJ_nid2ln(int a); |
385 | int q_OBJ_sn2nid(const char *s); |
386 | int q_OBJ_ln2nid(const char *s); |
387 | int q_i2t_ASN1_OBJECT(char *buf, int buf_len, ASN1_OBJECT *obj); |
388 | int q_OBJ_obj2txt(char *buf, int buf_len, ASN1_OBJECT *obj, int no_name); |
389 | int q_OBJ_obj2nid(const ASN1_OBJECT *a); |
390 | #define q_EVP_get_digestbynid(a) q_EVP_get_digestbyname(q_OBJ_nid2sn(a)) |
391 | EVP_PKEY *q_PEM_read_bio_PrivateKey(BIO *a, EVP_PKEY **b, pem_password_cb *c, void *d); |
392 | |
393 | int q_PEM_write_bio_PrivateKey(BIO *a, EVP_PKEY *b, const EVP_CIPHER *c, unsigned char *d, |
394 | int e, pem_password_cb *f, void *g); |
395 | int q_PEM_write_bio_PrivateKey_traditional(BIO *a, EVP_PKEY *b, const EVP_CIPHER *c, unsigned char *d, |
396 | int e, pem_password_cb *f, void *g); |
397 | EVP_PKEY *q_PEM_read_bio_PUBKEY(BIO *a, EVP_PKEY **b, pem_password_cb *c, void *d); |
398 | int q_PEM_write_bio_PUBKEY(BIO *a, EVP_PKEY *b); |
399 | |
400 | void q_RAND_seed(const void *a, int b); |
401 | int q_RAND_status(); |
402 | int q_RAND_bytes(unsigned char *b, int n); |
403 | int q_SSL_accept(SSL *a); |
404 | int q_SSL_clear(SSL *a); |
405 | char *q_SSL_CIPHER_description(const SSL_CIPHER *a, char *b, int c); |
406 | int q_SSL_CIPHER_get_bits(const SSL_CIPHER *a, int *b); |
407 | BIO *q_SSL_get_rbio(const SSL *s); |
408 | int q_SSL_connect(SSL *a); |
409 | int q_SSL_CTX_check_private_key(const SSL_CTX *a); |
410 | long q_SSL_CTX_ctrl(SSL_CTX *a, int b, long c, void *d); |
411 | void q_SSL_CTX_free(SSL_CTX *a); |
412 | SSL_CTX *q_SSL_CTX_new(const SSL_METHOD *a); |
413 | int q_SSL_CTX_set_cipher_list(SSL_CTX *a, const char *b); |
414 | int q_SSL_CTX_set_default_verify_paths(SSL_CTX *a); |
415 | void q_SSL_CTX_set_verify(SSL_CTX *a, int b, int (*c)(int, X509_STORE_CTX *)); |
416 | void q_SSL_CTX_set_verify_depth(SSL_CTX *a, int b); |
417 | extern "C" { |
418 | typedef void (*GenericCallbackType)(); |
419 | } |
420 | long q_SSL_CTX_callback_ctrl(SSL_CTX *, int, GenericCallbackType); |
421 | int q_SSL_CTX_use_certificate(SSL_CTX *a, X509 *b); |
422 | int q_SSL_CTX_use_certificate_file(SSL_CTX *a, const char *b, int c); |
423 | int q_SSL_CTX_use_PrivateKey(SSL_CTX *a, EVP_PKEY *b); |
424 | int q_SSL_CTX_use_PrivateKey_file(SSL_CTX *a, const char *b, int c); |
425 | X509_STORE *q_SSL_CTX_get_cert_store(const SSL_CTX *a); |
426 | SSL_CONF_CTX *q_SSL_CONF_CTX_new(); |
427 | void q_SSL_CONF_CTX_free(SSL_CONF_CTX *a); |
428 | void q_SSL_CONF_CTX_set_ssl_ctx(SSL_CONF_CTX *a, SSL_CTX *b); |
429 | unsigned int q_SSL_CONF_CTX_set_flags(SSL_CONF_CTX *a, unsigned int b); |
430 | int q_SSL_CONF_CTX_finish(SSL_CONF_CTX *a); |
431 | int q_SSL_CONF_cmd(SSL_CONF_CTX *a, const char *b, const char *c); |
432 | void q_SSL_free(SSL *a); |
433 | STACK_OF(SSL_CIPHER) *q_SSL_get_ciphers(const SSL *a); |
434 | const SSL_CIPHER *q_SSL_get_current_cipher(SSL *a); |
435 | int q_SSL_version(const SSL *a); |
436 | int q_SSL_get_error(SSL *a, int b); |
437 | STACK_OF(X509) *q_SSL_get_peer_cert_chain(SSL *a); |
438 | long q_SSL_get_verify_result(const SSL *a); |
439 | SSL *q_SSL_new(SSL_CTX *a); |
440 | SSL_CTX *q_SSL_get_SSL_CTX(SSL *a); |
441 | long q_SSL_ctrl(SSL *ssl,int cmd, long larg, void *parg); |
442 | int q_SSL_read(SSL *a, void *b, int c); |
443 | void q_SSL_set_bio(SSL *a, BIO *b, BIO *c); |
444 | void q_SSL_set_accept_state(SSL *a); |
445 | void q_SSL_set_connect_state(SSL *a); |
446 | int q_SSL_shutdown(SSL *a); |
447 | int q_SSL_in_init(const SSL *s); |
448 | int q_SSL_get_shutdown(const SSL *ssl); |
449 | int q_SSL_set_session(SSL *to, SSL_SESSION *session); |
450 | void q_SSL_SESSION_free(SSL_SESSION *ses); |
451 | SSL_SESSION *q_SSL_get1_session(SSL *ssl); |
452 | SSL_SESSION *q_SSL_get_session(const SSL *ssl); |
453 | int q_SSL_set_ex_data(SSL *ssl, int idx, void *arg); |
454 | void *q_SSL_get_ex_data(const SSL *ssl, int idx); |
455 | #ifndef OPENSSL_NO_PSK |
456 | typedef 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); |
457 | void q_SSL_set_psk_client_callback(SSL *ssl, q_psk_client_callback_t callback); |
458 | typedef unsigned int (*q_psk_server_callback_t)(SSL *ssl, const char *identity, unsigned char *psk, unsigned int max_psk_len); |
459 | void q_SSL_set_psk_server_callback(SSL *ssl, q_psk_server_callback_t callback); |
460 | int q_SSL_CTX_use_psk_identity_hint(SSL_CTX *ctx, const char *hint); |
461 | #endif // !OPENSSL_NO_PSK |
462 | int q_SSL_write(SSL *a, const void *b, int c); |
463 | int q_X509_cmp(X509 *a, X509 *b); |
464 | X509 *q_X509_dup(X509 *a); |
465 | void q_X509_print(BIO *a, X509*b); |
466 | int q_X509_digest(const X509 *x509, const EVP_MD *type, unsigned char *md, unsigned int *len); |
467 | ASN1_OBJECT *q_X509_EXTENSION_get_object(X509_EXTENSION *a); |
468 | void q_X509_free(X509 *a); |
469 | ASN1_TIME *q_X509_gmtime_adj(ASN1_TIME *s, long adj); |
470 | void q_ASN1_TIME_free(ASN1_TIME *t); |
471 | X509_EXTENSION *q_X509_get_ext(X509 *a, int b); |
472 | int q_X509_get_ext_count(X509 *a); |
473 | void *q_X509_get_ext_d2i(X509 *a, int b, int *c, int *d); |
474 | const X509V3_EXT_METHOD *q_X509V3_EXT_get(X509_EXTENSION *a); |
475 | void *q_X509V3_EXT_d2i(X509_EXTENSION *a); |
476 | int q_X509_EXTENSION_get_critical(X509_EXTENSION *a); |
477 | ASN1_OCTET_STRING *q_X509_EXTENSION_get_data(X509_EXTENSION *a); |
478 | void q_BASIC_CONSTRAINTS_free(BASIC_CONSTRAINTS *a); |
479 | void q_AUTHORITY_KEYID_free(AUTHORITY_KEYID *a); |
480 | int q_ASN1_STRING_print(BIO *a, const ASN1_STRING *b); |
481 | int q_X509_check_issued(X509 *a, X509 *b); |
482 | X509_NAME *q_X509_get_issuer_name(X509 *a); |
483 | X509_NAME *q_X509_get_subject_name(X509 *a); |
484 | ASN1_INTEGER *q_X509_get_serialNumber(X509 *a); |
485 | int q_X509_verify_cert(X509_STORE_CTX *ctx); |
486 | int q_X509_NAME_entry_count(X509_NAME *a); |
487 | X509_NAME_ENTRY *q_X509_NAME_get_entry(X509_NAME *a,int b); |
488 | ASN1_STRING *q_X509_NAME_ENTRY_get_data(X509_NAME_ENTRY *a); |
489 | ASN1_OBJECT *q_X509_NAME_ENTRY_get_object(X509_NAME_ENTRY *a); |
490 | EVP_PKEY *q_X509_PUBKEY_get(X509_PUBKEY *a); |
491 | void q_X509_STORE_free(X509_STORE *store); |
492 | X509_STORE *q_X509_STORE_new(); |
493 | int q_X509_STORE_add_cert(X509_STORE *ctx, X509 *x); |
494 | void q_X509_STORE_CTX_free(X509_STORE_CTX *storeCtx); |
495 | int q_X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, |
496 | X509 *x509, STACK_OF(X509) *chain); |
497 | X509_STORE_CTX *q_X509_STORE_CTX_new(); |
498 | int q_X509_STORE_CTX_set_purpose(X509_STORE_CTX *ctx, int purpose); |
499 | int q_X509_STORE_CTX_get_error(X509_STORE_CTX *ctx); |
500 | int q_X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx); |
501 | X509 *q_X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx); |
502 | X509_STORE *q_X509_STORE_CTX_get0_store(X509_STORE_CTX *ctx); |
503 | |
504 | // Diffie-Hellman support |
505 | #ifndef OPENSSL_NO_DEPRECATED_3_0 |
506 | DH *q_DH_new(); |
507 | void q_DH_free(DH *dh); |
508 | int q_DH_check(DH *dh, int *codes); |
509 | void q_DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g); |
510 | |
511 | DH *q_d2i_DHparams(DH **a, const unsigned char **pp, long length); |
512 | int q_i2d_DHparams(DH *a, unsigned char **p); |
513 | |
514 | DH *q_PEM_read_bio_DHparams(BIO *a, DH **b, pem_password_cb *c, void *d); |
515 | #endif // OPENSSL_NO_DEPRECATED_3_0 |
516 | |
517 | BIGNUM *q_BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret); |
518 | #define q_SSL_CTX_set_tmp_dh(ctx, dh) q_SSL_CTX_ctrl((ctx), SSL_CTRL_SET_TMP_DH, 0, (char *)dh) |
519 | |
520 | #ifndef OPENSSL_NO_EC |
521 | // EC Diffie-Hellman support |
522 | #define q_SSL_CTX_set_tmp_ecdh(ctx, ecdh) q_SSL_CTX_ctrl((ctx), SSL_CTRL_SET_TMP_ECDH, 0, (char *)ecdh) |
523 | |
524 | // EC curves management |
525 | size_t q_EC_get_builtin_curves(EC_builtin_curve *r, size_t nitems); |
526 | int q_EC_curve_nist2nid(const char *name); |
527 | #endif // OPENSSL_NO_EC |
528 | |
529 | #define q_SSL_get_server_tmp_key(ssl, key) q_SSL_ctrl((ssl), SSL_CTRL_GET_SERVER_TMP_KEY, 0, (char *)key) |
530 | |
531 | // PKCS#12 support |
532 | int q_PKCS12_parse(PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert, STACK_OF(X509) **ca); |
533 | PKCS12 *q_d2i_PKCS12_bio(BIO *bio, PKCS12 **pkcs12); |
534 | void q_PKCS12_free(PKCS12 *pkcs12); |
535 | |
536 | #define q_BIO_get_mem_data(b, pp) (int)q_BIO_ctrl(b,BIO_CTRL_INFO,0,(char *)pp) |
537 | #define q_BIO_pending(b) (int)q_BIO_ctrl(b,BIO_CTRL_PENDING,0,NULL) |
538 | #define q_SSL_CTX_set_mode(ctx,op) q_SSL_CTX_ctrl((ctx),SSL_CTRL_MODE,(op),NULL) |
539 | #define q_sk_GENERAL_NAME_num(st) q_SKM_sk_num((st)) |
540 | #define q_sk_GENERAL_NAME_value(st, i) q_SKM_sk_value(GENERAL_NAME, (st), (i)) |
541 | |
542 | void q_GENERAL_NAME_free(GENERAL_NAME *a); |
543 | |
544 | #define q_sk_X509_num(st) q_SKM_sk_num((st)) |
545 | #define q_sk_X509_value(st, i) q_SKM_sk_value(X509, (st), (i)) |
546 | #define q_sk_SSL_CIPHER_num(st) q_SKM_sk_num((st)) |
547 | #define q_sk_SSL_CIPHER_value(st, i) q_SKM_sk_value(SSL_CIPHER, (st), (i)) |
548 | #define (ctx,x509) \ |
549 | q_SSL_CTX_ctrl(ctx,SSL_CTRL_EXTRA_CHAIN_CERT,0,(char *)x509) |
550 | #define q_OpenSSL_add_all_algorithms() q_OPENSSL_add_all_algorithms_conf() |
551 | |
552 | #if OPENSSL_VERSION_MAJOR < 3 |
553 | int q_SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile, const char *CApath); |
554 | #else |
555 | int q_SSL_CTX_load_verify_dir(SSL_CTX *ctx, const char *CApath); |
556 | #endif // OPENSSL_VERSION_MAJOR |
557 | |
558 | int q_i2d_SSL_SESSION(SSL_SESSION *in, unsigned char **pp); |
559 | SSL_SESSION *q_d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp, long length); |
560 | |
561 | #ifndef OPENSSL_NO_NEXTPROTONEG |
562 | int q_SSL_select_next_proto(unsigned char **out, unsigned char *outlen, |
563 | const unsigned char *in, unsigned int inlen, |
564 | const unsigned char *client, unsigned int client_len); |
565 | void q_SSL_CTX_set_next_proto_select_cb(SSL_CTX *s, |
566 | int (*cb) (SSL *ssl, unsigned char **out, |
567 | unsigned char *outlen, |
568 | const unsigned char *in, |
569 | unsigned int inlen, void *arg), |
570 | void *arg); |
571 | void q_SSL_get0_next_proto_negotiated(const SSL *s, const unsigned char **data, |
572 | unsigned *len); |
573 | int q_SSL_set_alpn_protos(SSL *ssl, const unsigned char *protos, |
574 | unsigned protos_len); |
575 | void q_SSL_CTX_set_alpn_select_cb(SSL_CTX *ctx, |
576 | int (*cb) (SSL *ssl, |
577 | const unsigned char **out, |
578 | unsigned char *outlen, |
579 | const unsigned char *in, |
580 | unsigned int inlen, |
581 | void *arg), void *arg); |
582 | void q_SSL_get0_alpn_selected(const SSL *ssl, const unsigned char **data, |
583 | unsigned *len); |
584 | #endif // !OPENSSL_NO_NEXTPROTONEG |
585 | |
586 | |
587 | #if QT_CONFIG(dtls) |
588 | |
589 | extern "C" |
590 | { |
591 | typedef int (*CookieGenerateCallback)(SSL *, unsigned char *, unsigned *); |
592 | } |
593 | |
594 | void q_SSL_CTX_set_cookie_generate_cb(SSL_CTX *ctx, CookieGenerateCallback cb); |
595 | void q_SSL_CTX_set_cookie_verify_cb(SSL_CTX *ctx, CookieVerifyCallback cb); |
596 | const SSL_METHOD *q_DTLS_server_method(); |
597 | const SSL_METHOD *q_DTLS_client_method(); |
598 | |
599 | #endif // dtls |
600 | |
601 | void *q_X509_STORE_CTX_get_ex_data(X509_STORE_CTX *ctx, int idx); |
602 | int q_SSL_get_ex_data_X509_STORE_CTX_idx(); |
603 | |
604 | #if QT_CONFIG(dtls) |
605 | #define q_DTLS_set_link_mtu(ssl, mtu) q_SSL_ctrl((ssl), DTLS_CTRL_SET_LINK_MTU, (mtu), nullptr) |
606 | #define q_DTLSv1_get_timeout(ssl, arg) q_SSL_ctrl(ssl, DTLS_CTRL_GET_TIMEOUT, 0, arg) |
607 | #define q_DTLSv1_handle_timeout(ssl) q_SSL_ctrl(ssl, DTLS_CTRL_HANDLE_TIMEOUT, 0, nullptr) |
608 | #endif // dtls |
609 | |
610 | void q_BIO_set_flags(BIO *b, int flags); |
611 | void q_BIO_clear_flags(BIO *b, int flags); |
612 | void *q_BIO_get_ex_data(BIO *b, int idx); |
613 | int q_BIO_set_ex_data(BIO *b, int idx, void *data); |
614 | |
615 | #define q_BIO_set_retry_read(b) q_BIO_set_flags(b, (BIO_FLAGS_READ|BIO_FLAGS_SHOULD_RETRY)) |
616 | #define q_BIO_set_retry_write(b) q_BIO_set_flags(b, (BIO_FLAGS_WRITE|BIO_FLAGS_SHOULD_RETRY)) |
617 | #define q_BIO_clear_retry_flags(b) q_BIO_clear_flags(b, (BIO_FLAGS_RWS|BIO_FLAGS_SHOULD_RETRY)) |
618 | #define q_BIO_set_app_data(s,arg) q_BIO_set_ex_data(s,0,arg) |
619 | #define q_BIO_get_app_data(s) q_BIO_get_ex_data(s,0) |
620 | |
621 | #define q_SSL_set_tlsext_status_type(ssl, type) \ |
622 | q_SSL_ctrl((ssl), SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE, (type), nullptr) |
623 | |
624 | #if QT_CONFIG(ocsp) |
625 | |
626 | OCSP_RESPONSE *q_d2i_OCSP_RESPONSE(OCSP_RESPONSE **a, const unsigned char **in, long len); |
627 | int q_i2d_OCSP_RESPONSE(OCSP_RESPONSE *r, unsigned char **ppout); |
628 | OCSP_RESPONSE *q_OCSP_response_create(int status, OCSP_BASICRESP *bs); |
629 | void q_OCSP_RESPONSE_free(OCSP_RESPONSE *rs); |
630 | int q_OCSP_response_status(OCSP_RESPONSE *resp); |
631 | OCSP_BASICRESP *q_OCSP_response_get1_basic(OCSP_RESPONSE *resp); |
632 | OCSP_SINGLERESP *q_OCSP_basic_add1_status(OCSP_BASICRESP *rsp, OCSP_CERTID *cid, |
633 | int status, int reason, ASN1_TIME *revtime, |
634 | ASN1_TIME *thisupd, ASN1_TIME *nextupd); |
635 | int q_OCSP_basic_sign(OCSP_BASICRESP *brsp, X509 *signer, EVP_PKEY *key, const EVP_MD *dgst, |
636 | STACK_OF(X509) *certs, unsigned long flags); |
637 | OCSP_BASICRESP *q_OCSP_BASICRESP_new(); |
638 | void q_OCSP_BASICRESP_free(OCSP_BASICRESP *bs); |
639 | int q_OCSP_basic_verify(OCSP_BASICRESP *bs, STACK_OF(X509) *certs, X509_STORE *st, unsigned long flags); |
640 | int q_OCSP_resp_count(OCSP_BASICRESP *bs); |
641 | OCSP_SINGLERESP *q_OCSP_resp_get0(OCSP_BASICRESP *bs, int idx); |
642 | int q_OCSP_single_get0_status(OCSP_SINGLERESP *single, int *reason, ASN1_GENERALIZEDTIME **revtime, |
643 | ASN1_GENERALIZEDTIME **thisupd, ASN1_GENERALIZEDTIME **nextupd); |
644 | int q_OCSP_check_validity(ASN1_GENERALIZEDTIME *thisupd, ASN1_GENERALIZEDTIME *nextupd, long nsec, long maxsec); |
645 | int q_OCSP_id_get0_info(ASN1_OCTET_STRING **piNameHash, ASN1_OBJECT **pmd, ASN1_OCTET_STRING **pikeyHash, |
646 | ASN1_INTEGER **pserial, OCSP_CERTID *cid); |
647 | |
648 | const STACK_OF(X509) *q_OCSP_resp_get0_certs(const OCSP_BASICRESP *bs); |
649 | OCSP_CERTID *q_OCSP_cert_to_id(const EVP_MD *dgst, X509 *subject, X509 *issuer); |
650 | void q_OCSP_CERTID_free(OCSP_CERTID *cid); |
651 | int q_OCSP_id_cmp(OCSP_CERTID *a, OCSP_CERTID *b); |
652 | |
653 | #define q_SSL_get_tlsext_status_ocsp_resp(ssl, arg) \ |
654 | q_SSL_ctrl(ssl, SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP, 0, arg) |
655 | |
656 | #define q_SSL_CTX_set_tlsext_status_cb(ssl, cb) \ |
657 | q_SSL_CTX_callback_ctrl(ssl, SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB, GenericCallbackType(cb)) |
658 | |
659 | # define q_SSL_set_tlsext_status_ocsp_resp(ssl, arg, arglen) \ |
660 | q_SSL_ctrl(ssl, SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP, arglen, arg) |
661 | |
662 | #endif // ocsp |
663 | |
664 | |
665 | void *q_CRYPTO_malloc(size_t num, const char *file, int line); |
666 | #define q_OPENSSL_malloc(num) q_CRYPTO_malloc(num, "", 0) |
667 | void q_CRYPTO_free(void *str, const char *file, int line); |
668 | # define q_OPENSSL_free(addr) q_CRYPTO_free(addr, "", 0) |
669 | int q_CRYPTO_memcmp(const void * in_a, const void * in_b, size_t len); |
670 | |
671 | void q_SSL_set_info_callback(SSL *ssl, void (*cb) (const SSL *ssl, int type, int val)); |
672 | const char *q_SSL_alert_type_string(int value); |
673 | const char *q_SSL_alert_desc_string_long(int value); |
674 | |
675 | int q_SSL_CTX_get_security_level(const SSL_CTX *ctx); |
676 | void q_SSL_CTX_set_security_level(SSL_CTX *ctx, int level); |
677 | |
678 | // Here we have the ones that make difference between OpenSSL pre/post v3: |
679 | #if defined(OPENSSL_VERSION_MAJOR) && OPENSSL_VERSION_MAJOR >= 3 |
680 | X509 *q_SSL_get1_peer_certificate(SSL *a); |
681 | #define q_SSL_get_peer_certificate q_SSL_get1_peer_certificate |
682 | int q_EVP_PKEY_get_bits(const EVP_PKEY *pkey); |
683 | int q_EVP_PKEY_get_base_id(const EVP_PKEY *pkey); |
684 | #define q_EVP_PKEY_base_id q_EVP_PKEY_get_base_id |
685 | #else |
686 | X509 *q_SSL_get_peer_certificate(SSL *a); |
687 | int q_EVP_PKEY_base_id(EVP_PKEY *a); |
688 | #endif // OPENSSL_VERSION_MAJOR >= 3 |
689 | |
690 | #ifndef OPENSSL_NO_DEPRECATED_3_0 |
691 | |
692 | DSA *q_DSA_new(); |
693 | void q_DSA_free(DSA *a); |
694 | |
695 | RSA *q_RSA_new(); |
696 | void q_RSA_free(RSA *a); |
697 | |
698 | #ifndef OPENSSL_NO_EC |
699 | |
700 | EC_KEY *q_EC_KEY_dup(const EC_KEY *src); |
701 | EC_KEY *q_EC_KEY_new_by_curve_name(int nid); |
702 | void q_EC_KEY_free(EC_KEY *ecdh); |
703 | |
704 | #endif // OPENSSL_NO_EC |
705 | |
706 | int q_SSL_CTX_use_RSAPrivateKey(SSL_CTX *a, RSA *b); |
707 | |
708 | DSA *q_PEM_read_bio_DSA_PUBKEY(BIO *a, DSA **b, pem_password_cb *c, void *d); |
709 | RSA *q_PEM_read_bio_RSA_PUBKEY(BIO *a, RSA **b, pem_password_cb *c, void *d); |
710 | |
711 | DSA *q_PEM_read_bio_DSAPrivateKey(BIO *a, DSA **b, pem_password_cb *c, void *d); |
712 | RSA *q_PEM_read_bio_RSAPrivateKey(BIO *a, RSA **b, pem_password_cb *c, void *d); |
713 | |
714 | int q_PEM_write_bio_DSA_PUBKEY(BIO *a, DSA *b); |
715 | int q_PEM_write_bio_RSA_PUBKEY(BIO *a, RSA *b); |
716 | |
717 | int q_PEM_write_bio_DSAPrivateKey(BIO *a, DSA *b, const EVP_CIPHER *c, unsigned char *d, |
718 | int e, pem_password_cb *f, void *g); |
719 | int q_PEM_write_bio_RSAPrivateKey(BIO *a, RSA *b, const EVP_CIPHER *c, unsigned char *d, |
720 | int e, pem_password_cb *f, void *g); |
721 | |
722 | RSA *q_EVP_PKEY_get1_RSA(EVP_PKEY *a); |
723 | DSA *q_EVP_PKEY_get1_DSA(EVP_PKEY *a); |
724 | DH *q_EVP_PKEY_get1_DH(EVP_PKEY *a); |
725 | |
726 | int q_EVP_PKEY_set1_RSA(EVP_PKEY *a, RSA *b); |
727 | int q_EVP_PKEY_set1_DSA(EVP_PKEY *a, DSA *b); |
728 | int q_EVP_PKEY_set1_DH(EVP_PKEY *a, DH *b); |
729 | |
730 | int q_DH_bits(DH *dh); |
731 | int q_RSA_bits(RSA *a); |
732 | int q_DSA_bits(DSA *a); |
733 | |
734 | int q_EVP_PKEY_assign(EVP_PKEY *a, int b, void *r); |
735 | int q_EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b); |
736 | |
737 | #ifndef OPENSSL_NO_EC |
738 | |
739 | EC_KEY *q_PEM_read_bio_EC_PUBKEY(BIO *a, EC_KEY **b, pem_password_cb *c, void *d); |
740 | EC_KEY *q_PEM_read_bio_ECPrivateKey(BIO *a, EC_KEY **b, pem_password_cb *c, void *d); |
741 | |
742 | int q_PEM_write_bio_ECPrivateKey(BIO *a, EC_KEY *b, const EVP_CIPHER *c, unsigned char *d, |
743 | int e, pem_password_cb *f, void *g); |
744 | int q_PEM_write_bio_EC_PUBKEY(BIO *a, EC_KEY *b); |
745 | |
746 | EC_KEY *q_EVP_PKEY_get1_EC_KEY(EVP_PKEY *a); |
747 | int q_EVP_PKEY_set1_EC_KEY(EVP_PKEY *a, EC_KEY *b); |
748 | |
749 | const EC_GROUP* q_EC_KEY_get0_group(const EC_KEY* k); |
750 | int q_EC_GROUP_get_degree(const EC_GROUP* g); |
751 | |
752 | #define q_EVP_PKEY_assign_RSA(pkey,rsa) q_EVP_PKEY_assign((pkey),EVP_PKEY_RSA,\ |
753 | (char *)(rsa)) |
754 | #define q_EVP_PKEY_assign_DSA(pkey,dsa) q_EVP_PKEY_assign((pkey),EVP_PKEY_DSA,\ |
755 | (char *)(dsa)) |
756 | |
757 | |
758 | #endif // OPENSSL_NO_EC |
759 | |
760 | #endif // OPENSSL_NO_DEPRECATED_3_0 |
761 | |
762 | QT_END_NAMESPACE |
763 | |
764 | #endif |
765 | |