~ubuntu-branches/ubuntu/wily/qtbase-opensource-src/wily

« back to all changes in this revision

Viewing changes to src/network/ssl/qsslsocket_openssl_symbols_p.h

  • Committer: Package Import Robot
  • Author(s): Timo Jyrinki
  • Date: 2013-02-05 12:46:17 UTC
  • Revision ID: package-import@ubuntu.com-20130205124617-c8jouts182j002fx
Tags: upstream-5.0.1+dfsg
ImportĀ upstreamĀ versionĀ 5.0.1+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/****************************************************************************
 
2
**
 
3
** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
 
4
** Contact: http://www.qt-project.org/legal
 
5
**
 
6
** This file is part of the QtNetwork module of the Qt Toolkit.
 
7
**
 
8
** $QT_BEGIN_LICENSE:LGPL$
 
9
** Commercial License Usage
 
10
** Licensees holding valid commercial Qt licenses may use this file in
 
11
** accordance with the commercial license agreement provided with the
 
12
** Software or, alternatively, in accordance with the terms contained in
 
13
** a written agreement between you and Digia.  For licensing terms and
 
14
** conditions see http://qt.digia.com/licensing.  For further information
 
15
** use the contact form at http://qt.digia.com/contact-us.
 
16
**
 
17
** GNU Lesser General Public License Usage
 
18
** Alternatively, this file may be used under the terms of the GNU Lesser
 
19
** General Public License version 2.1 as published by the Free Software
 
20
** Foundation and appearing in the file LICENSE.LGPL included in the
 
21
** packaging of this file.  Please review the following information to
 
22
** ensure the GNU Lesser General Public License version 2.1 requirements
 
23
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 
24
**
 
25
** In addition, as a special exception, Digia gives you certain additional
 
26
** rights.  These rights are described in the Digia Qt LGPL Exception
 
27
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
 
28
**
 
29
** GNU General Public License Usage
 
30
** Alternatively, this file may be used under the terms of the GNU
 
31
** General Public License version 3.0 as published by the Free Software
 
32
** Foundation and appearing in the file LICENSE.GPL included in the
 
33
** packaging of this file.  Please review the following information to
 
34
** ensure the GNU General Public License version 3.0 requirements will be
 
35
** met: http://www.gnu.org/copyleft/gpl.html.
 
36
**
 
37
**
 
38
** $QT_END_LICENSE$
 
39
**
 
40
****************************************************************************/
 
41
 
 
42
 
 
43
#ifndef QSSLSOCKET_OPENSSL_SYMBOLS_P_H
 
44
#define QSSLSOCKET_OPENSSL_SYMBOLS_P_H
 
45
 
 
46
//
 
47
//  W A R N I N G
 
48
//  -------------
 
49
//
 
50
// This file is not part of the Qt API.  It exists for the convenience
 
51
// of the QLibrary class.  This header file may change from
 
52
// version to version without notice, or even be removed.
 
53
//
 
54
// We mean it.
 
55
//
 
56
 
 
57
#include "qsslsocket_openssl_p.h"
 
58
 
 
59
QT_BEGIN_NAMESPACE
 
60
 
 
61
#define DUMMYARG
 
62
 
 
63
#if !defined QT_LINKED_OPENSSL
 
64
// **************** Shared declarations ******************
 
65
// ret func(arg)
 
66
 
 
67
#  define DEFINEFUNC(ret, func, arg, a, err, funcret)                           \
 
68
    typedef ret (*_q_PTR_##func)(arg);                                  \
 
69
    static _q_PTR_##func _q_##func = 0;                                 \
 
70
    ret q_##func(arg) {                                         \
 
71
        if (!_q_##func) {                               \
 
72
            qWarning("QSslSocket: cannot call unresolved function "#func);      \
 
73
            err;                                                                \
 
74
        } \
 
75
        funcret _q_##func(a); \
 
76
    }
 
77
 
 
78
// ret func(arg1, arg2)
 
79
#  define DEFINEFUNC2(ret, func, arg1, a, arg2, b, err, funcret) \
 
80
    typedef ret (*_q_PTR_##func)(arg1, arg2);         \
 
81
    static _q_PTR_##func _q_##func = 0;               \
 
82
    ret q_##func(arg1, arg2) { \
 
83
        if (!_q_##func) { \
 
84
            qWarning("QSslSocket: cannot call unresolved function "#func);\
 
85
            err; \
 
86
        } \
 
87
        funcret _q_##func(a, b); \
 
88
    }
 
89
 
 
90
// ret func(arg1, arg2, arg3)
 
91
#  define DEFINEFUNC3(ret, func, arg1, a, arg2, b, arg3, c, err, funcret) \
 
92
    typedef ret (*_q_PTR_##func)(arg1, arg2, arg3);            \
 
93
    static _q_PTR_##func _q_##func = 0;                        \
 
94
    ret q_##func(arg1, arg2, arg3) { \
 
95
        if (!_q_##func) { \
 
96
            qWarning("QSslSocket: cannot call unresolved function "#func); \
 
97
            err; \
 
98
        } \
 
99
        funcret _q_##func(a, b, c); \
 
100
    }
 
101
 
 
102
// ret func(arg1, arg2, arg3, arg4)
 
103
#  define DEFINEFUNC4(ret, func, arg1, a, arg2, b, arg3, c, arg4, d, err, funcret) \
 
104
    typedef ret (*_q_PTR_##func)(arg1, arg2, arg3, arg4);               \
 
105
    static _q_PTR_##func _q_##func = 0;                                 \
 
106
    ret q_##func(arg1, arg2, arg3, arg4) { \
 
107
         if (!_q_##func) { \
 
108
             qWarning("QSslSocket: cannot call unresolved function "#func); \
 
109
             err; \
 
110
         } \
 
111
         funcret _q_##func(a, b, c, d); \
 
112
    }
 
113
 
 
114
// ret func(arg1, arg2, arg3, arg4, arg5)
 
115
#  define DEFINEFUNC5(ret, func, arg1, a, arg2, b, arg3, c, arg4, d, arg5, e, err, funcret) \
 
116
    typedef ret (*_q_PTR_##func)(arg1, arg2, arg3, arg4, arg5);         \
 
117
    static _q_PTR_##func _q_##func = 0;                                 \
 
118
    ret q_##func(arg1, arg2, arg3, arg4, arg5) { \
 
119
        if (!_q_##func) { \
 
120
            qWarning("QSslSocket: cannot call unresolved function "#func); \
 
121
            err; \
 
122
        } \
 
123
        funcret _q_##func(a, b, c, d, e); \
 
124
    }
 
125
 
 
126
// ret func(arg1, arg2, arg3, arg4, arg6)
 
127
#  define DEFINEFUNC6(ret, func, arg1, a, arg2, b, arg3, c, arg4, d, arg5, e, arg6, f, err, funcret) \
 
128
    typedef ret (*_q_PTR_##func)(arg1, arg2, arg3, arg4, arg5, arg6);   \
 
129
    static _q_PTR_##func _q_##func = 0;                                 \
 
130
    ret q_##func(arg1, arg2, arg3, arg4, arg5, arg6) { \
 
131
        if (!_q_##func) { \
 
132
            qWarning("QSslSocket: cannot call unresolved function "#func); \
 
133
            err; \
 
134
        } \
 
135
        funcret _q_##func(a, b, c, d, e, f); \
 
136
    }
 
137
 
 
138
// ret func(arg1, arg2, arg3, arg4, arg6, arg7)
 
139
#  define DEFINEFUNC7(ret, func, arg1, a, arg2, b, arg3, c, arg4, d, arg5, e, arg6, f, arg7, g, err, funcret) \
 
140
    typedef ret (*_q_PTR_##func)(arg1, arg2, arg3, arg4, arg5, arg6, arg7);   \
 
141
    static _q_PTR_##func _q_##func = 0;                                       \
 
142
    ret q_##func(arg1, arg2, arg3, arg4, arg5, arg6, arg7) { \
 
143
        if (!_q_##func) { \
 
144
            qWarning("QSslSocket: cannot call unresolved function "#func); \
 
145
            err; \
 
146
        } \
 
147
        funcret _q_##func(a, b, c, d, e, f, g); \
 
148
    }
 
149
 
 
150
// ret func(arg1, arg2, arg3, arg4, arg6, arg7, arg8, arg9)
 
151
#  define DEFINEFUNC9(ret, func, arg1, a, arg2, b, arg3, c, arg4, d, arg5, e, arg6, f, arg7, g, arg8, h, arg9, i, err, funcret) \
 
152
    typedef ret (*_q_PTR_##func)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);   \
 
153
    static _q_PTR_##func _q_##func = 0;                                                   \
 
154
    ret q_##func(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { \
 
155
        if (_q_##func) { \
 
156
            qWarning("QSslSocket: cannot call unresolved function "#func); \
 
157
            err; \
 
158
        }   \
 
159
        funcret _q_##func(a, b, c, d, e, f, g, h, i); \
 
160
    }
 
161
// **************** Shared declarations ******************
 
162
 
 
163
#else // !defined QT_LINKED_OPENSSL
 
164
 
 
165
// **************** Static declarations ******************
 
166
 
 
167
// ret func(arg)
 
168
#  define DEFINEFUNC(ret, func, arg, a, err, funcret)                           \
 
169
    ret q_##func(arg) { funcret func(a); }
 
170
 
 
171
// ret func(arg1, arg2)
 
172
#  define DEFINEFUNC2(ret, func, arg1, a, arg2, b, err, funcret) \
 
173
    ret q_##func(arg1, arg2) { funcret func(a, b); }
 
174
 
 
175
// ret func(arg1, arg2, arg3)
 
176
#  define DEFINEFUNC3(ret, func, arg1, a, arg2, b, arg3, c, err, funcret) \
 
177
    ret q_##func(arg1, arg2, arg3) { funcret func(a, b, c); }
 
178
 
 
179
// ret func(arg1, arg2, arg3, arg4)
 
180
#  define DEFINEFUNC4(ret, func, arg1, a, arg2, b, arg3, c, arg4, d, err, funcret) \
 
181
    ret q_##func(arg1, arg2, arg3, arg4) { funcret func(a, b, c, d); }
 
182
 
 
183
// ret func(arg1, arg2, arg3, arg4, arg5)
 
184
#  define DEFINEFUNC5(ret, func, arg1, a, arg2, b, arg3, c, arg4, d, arg5, e, err, funcret) \
 
185
    ret q_##func(arg1, arg2, arg3, arg4, arg5) { funcret func(a, b, c, d, e); }
 
186
 
 
187
// ret func(arg1, arg2, arg3, arg4, arg6)
 
188
#  define DEFINEFUNC6(ret, func, arg1, a, arg2, b, arg3, c, arg4, d, arg5, e, arg6, f, err, funcret) \
 
189
    ret q_##func(arg1, arg2, arg3, arg4, arg5, arg6) { funcret func(a, b, c, d, e, f); }
 
190
 
 
191
// ret func(arg1, arg2, arg3, arg4, arg6, arg7)
 
192
#  define DEFINEFUNC7(ret, func, arg1, a, arg2, b, arg3, c, arg4, d, arg5, e, arg6, f, arg7, g, err, funcret) \
 
193
    ret q_##func(arg1, arg2, arg3, arg4, arg5, arg6, arg7) { funcret func(a, b, c, d, e, f, g); }
 
194
 
 
195
// ret func(arg1, arg2, arg3, arg4, arg6, arg7, arg8, arg9)
 
196
#  define DEFINEFUNC9(ret, func, arg1, a, arg2, b, arg3, c, arg4, d, arg5, e, arg6, f, arg7, g, arg8, h, arg9, i, err, funcret) \
 
197
    ret q_##func(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { funcret func(a, b, c, d, e, f, g, h, i); }
 
198
 
 
199
// **************** Static declarations ******************
 
200
 
 
201
#endif // !defined QT_LINKED_OPENSSL
 
202
 
 
203
bool q_resolveOpenSslSymbols();
 
204
long q_ASN1_INTEGER_get(ASN1_INTEGER *a);
 
205
unsigned char * q_ASN1_STRING_data(ASN1_STRING *a);
 
206
int q_ASN1_STRING_length(ASN1_STRING *a);
 
207
int q_ASN1_STRING_to_UTF8(unsigned char **a, ASN1_STRING *b);
 
208
long q_BIO_ctrl(BIO *a, int b, long c, void *d);
 
209
int q_BIO_free(BIO *a);
 
210
BIO *q_BIO_new(BIO_METHOD *a);
 
211
BIO *q_BIO_new_mem_buf(void *a, int b);
 
212
int q_BIO_read(BIO *a, void *b, int c);
 
213
BIO_METHOD *q_BIO_s_mem();
 
214
int q_BIO_write(BIO *a, const void *b, int c);
 
215
int q_BN_num_bits(const BIGNUM *a);
 
216
int q_CRYPTO_num_locks();
 
217
void q_CRYPTO_set_locking_callback(void (*a)(int, int, const char *, int));
 
218
void q_CRYPTO_set_id_callback(unsigned long (*a)());
 
219
void q_CRYPTO_free(void *a);
 
220
void q_DSA_free(DSA *a);
 
221
#if OPENSSL_VERSION_NUMBER >= 0x00908000L
 
222
// 0.9.8 broke SC and BC by changing this function's signature.
 
223
X509 *q_d2i_X509(X509 **a, const unsigned char **b, long c);
 
224
#else
 
225
X509 *q_d2i_X509(X509 **a, unsigned char **b, long c);
 
226
#endif
 
227
char *q_ERR_error_string(unsigned long a, char *b);
 
228
unsigned long q_ERR_get_error();
 
229
void q_ERR_free_strings();
 
230
const EVP_CIPHER *q_EVP_des_ede3_cbc();
 
231
int q_EVP_PKEY_assign(EVP_PKEY *a, int b, char *c);
 
232
Q_AUTOTEST_EXPORT int q_EVP_PKEY_set1_RSA(EVP_PKEY *a, RSA *b);
 
233
int q_EVP_PKEY_set1_DSA(EVP_PKEY *a, DSA *b);
 
234
void q_EVP_PKEY_free(EVP_PKEY *a);
 
235
RSA *q_EVP_PKEY_get1_RSA(EVP_PKEY *a);
 
236
DSA *q_EVP_PKEY_get1_DSA(EVP_PKEY *a);
 
237
int q_EVP_PKEY_type(int a);
 
238
Q_AUTOTEST_EXPORT EVP_PKEY *q_EVP_PKEY_new();
 
239
int q_i2d_X509(X509 *a, unsigned char **b);
 
240
const char *q_OBJ_nid2sn(int a);
 
241
const char *q_OBJ_nid2ln(int a);
 
242
int q_i2t_ASN1_OBJECT(char *buf, int buf_len, ASN1_OBJECT *obj);
 
243
int q_OBJ_obj2txt(char *buf, int buf_len, ASN1_OBJECT *obj, int no_name);
 
244
int q_OBJ_obj2nid(const ASN1_OBJECT *a);
 
245
#ifdef SSLEAY_MACROS
 
246
// ### verify
 
247
void *q_PEM_ASN1_read_bio(d2i_of_void *a, const char *b, BIO *c, void **d, pem_password_cb *e,
 
248
                          void *f);
 
249
// ### ditto for write
 
250
#else
 
251
DSA *q_PEM_read_bio_DSAPrivateKey(BIO *a, DSA **b, pem_password_cb *c, void *d);
 
252
RSA *q_PEM_read_bio_RSAPrivateKey(BIO *a, RSA **b, pem_password_cb *c, void *d);
 
253
int q_PEM_write_bio_DSAPrivateKey(BIO *a, DSA *b, const EVP_CIPHER *c, unsigned char *d,
 
254
                                  int e, pem_password_cb *f, void *g);
 
255
int q_PEM_write_bio_RSAPrivateKey(BIO *a, RSA *b, const EVP_CIPHER *c, unsigned char *d,
 
256
                                  int e, pem_password_cb *f, void *g);
 
257
#endif
 
258
DSA *q_PEM_read_bio_DSA_PUBKEY(BIO *a, DSA **b, pem_password_cb *c, void *d);
 
259
RSA *q_PEM_read_bio_RSA_PUBKEY(BIO *a, RSA **b, pem_password_cb *c, void *d);
 
260
int q_PEM_write_bio_DSA_PUBKEY(BIO *a, DSA *b);
 
261
int q_PEM_write_bio_RSA_PUBKEY(BIO *a, RSA *b);
 
262
void q_RAND_seed(const void *a, int b);
 
263
int q_RAND_status();
 
264
void q_RSA_free(RSA *a);
 
265
int q_sk_num(STACK *a);
 
266
void q_sk_pop_free(STACK *a, void (*b)(void *));
 
267
#if OPENSSL_VERSION_NUMBER >= 0x10000000L
 
268
_STACK *q_sk_new_null();
 
269
void q_sk_push(_STACK *st, void *data);
 
270
void q_sk_free(_STACK *a);
 
271
void * q_sk_value(STACK *a, int b);
 
272
#else
 
273
STACK *q_sk_new_null();
 
274
void q_sk_push(STACK *st, void *data);
 
275
void q_sk_free(STACK *a);
 
276
char * q_sk_value(STACK *a, int b);
 
277
#endif
 
278
int q_SSL_accept(SSL *a);
 
279
int q_SSL_clear(SSL *a);
 
280
char *q_SSL_CIPHER_description(SSL_CIPHER *a, char *b, int c);
 
281
int q_SSL_connect(SSL *a);
 
282
#if OPENSSL_VERSION_NUMBER >= 0x00908000L
 
283
// 0.9.8 broke SC and BC by changing this function's signature.
 
284
int q_SSL_CTX_check_private_key(const SSL_CTX *a);
 
285
#else
 
286
int q_SSL_CTX_check_private_key(SSL_CTX *a);
 
287
#endif
 
288
long q_SSL_CTX_ctrl(SSL_CTX *a, int b, long c, void *d);
 
289
void q_SSL_CTX_free(SSL_CTX *a);
 
290
#if OPENSSL_VERSION_NUMBER >= 0x10000000L
 
291
SSL_CTX *q_SSL_CTX_new(const SSL_METHOD *a);
 
292
#else
 
293
SSL_CTX *q_SSL_CTX_new(SSL_METHOD *a);
 
294
#endif
 
295
int q_SSL_CTX_set_cipher_list(SSL_CTX *a, const char *b);
 
296
int q_SSL_CTX_set_default_verify_paths(SSL_CTX *a);
 
297
void q_SSL_CTX_set_verify(SSL_CTX *a, int b, int (*c)(int, X509_STORE_CTX *));
 
298
void q_SSL_CTX_set_verify_depth(SSL_CTX *a, int b);
 
299
int q_SSL_CTX_use_certificate(SSL_CTX *a, X509 *b);
 
300
int q_SSL_CTX_use_certificate_file(SSL_CTX *a, const char *b, int c);
 
301
int q_SSL_CTX_use_PrivateKey(SSL_CTX *a, EVP_PKEY *b);
 
302
int q_SSL_CTX_use_RSAPrivateKey(SSL_CTX *a, RSA *b);
 
303
int q_SSL_CTX_use_PrivateKey_file(SSL_CTX *a, const char *b, int c);
 
304
void q_SSL_free(SSL *a);
 
305
#if OPENSSL_VERSION_NUMBER >= 0x00908000L
 
306
// 0.9.8 broke SC and BC by changing this function's signature.
 
307
STACK_OF(SSL_CIPHER) *q_SSL_get_ciphers(const SSL *a);
 
308
#else
 
309
STACK_OF(SSL_CIPHER) *q_SSL_get_ciphers(SSL *a);
 
310
#endif
 
311
#if OPENSSL_VERSION_NUMBER >= 0x10000000L
 
312
const SSL_CIPHER *q_SSL_get_current_cipher(SSL *a);
 
313
#else
 
314
SSL_CIPHER *q_SSL_get_current_cipher(SSL *a);
 
315
#endif
 
316
int q_SSL_get_error(SSL *a, int b);
 
317
STACK_OF(X509) *q_SSL_get_peer_cert_chain(SSL *a);
 
318
X509 *q_SSL_get_peer_certificate(SSL *a);
 
319
#if OPENSSL_VERSION_NUMBER >= 0x00908000L
 
320
// 0.9.8 broke SC and BC by changing this function's signature.
 
321
long q_SSL_get_verify_result(const SSL *a);
 
322
#else
 
323
long q_SSL_get_verify_result(SSL *a);
 
324
#endif
 
325
int q_SSL_library_init();
 
326
void q_SSL_load_error_strings();
 
327
SSL *q_SSL_new(SSL_CTX *a);
 
328
#if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT)
 
329
long q_SSL_ctrl(SSL *ssl,int cmd, long larg, void *parg);
 
330
#endif
 
331
int q_SSL_read(SSL *a, void *b, int c);
 
332
void q_SSL_set_bio(SSL *a, BIO *b, BIO *c);
 
333
void q_SSL_set_accept_state(SSL *a);
 
334
void q_SSL_set_connect_state(SSL *a);
 
335
int q_SSL_shutdown(SSL *a);
 
336
#if OPENSSL_VERSION_NUMBER >= 0x10000000L
 
337
const SSL_METHOD *q_SSLv2_client_method();
 
338
const SSL_METHOD *q_SSLv3_client_method();
 
339
const SSL_METHOD *q_SSLv23_client_method();
 
340
const SSL_METHOD *q_TLSv1_client_method();
 
341
const SSL_METHOD *q_TLSv1_1_client_method();
 
342
const SSL_METHOD *q_TLSv1_2_client_method();
 
343
const SSL_METHOD *q_SSLv2_server_method();
 
344
const SSL_METHOD *q_SSLv3_server_method();
 
345
const SSL_METHOD *q_SSLv23_server_method();
 
346
const SSL_METHOD *q_TLSv1_server_method();
 
347
const SSL_METHOD *q_TLSv1_1_server_method();
 
348
const SSL_METHOD *q_TLSv1_2_server_method();
 
349
#else
 
350
SSL_METHOD *q_SSLv2_client_method();
 
351
SSL_METHOD *q_SSLv3_client_method();
 
352
SSL_METHOD *q_SSLv23_client_method();
 
353
SSL_METHOD *q_TLSv1_client_method();
 
354
SSL_METHOD *q_TLSv1_1_client_method();
 
355
SSL_METHOD *q_TLSv1_2_client_method();
 
356
SSL_METHOD *q_SSLv2_server_method();
 
357
SSL_METHOD *q_SSLv3_server_method();
 
358
SSL_METHOD *q_SSLv23_server_method();
 
359
SSL_METHOD *q_TLSv1_server_method();
 
360
SSL_METHOD *q_TLSv1_1_server_method();
 
361
SSL_METHOD *q_TLSv1_2_server_method();
 
362
#endif
 
363
int q_SSL_write(SSL *a, const void *b, int c);
 
364
int q_X509_cmp(X509 *a, X509 *b);
 
365
#ifdef SSLEAY_MACROS
 
366
void *q_ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, char *x);
 
367
#define q_X509_dup(x509) (X509 *)q_ASN1_dup((i2d_of_void *)q_i2d_X509, \
 
368
                (d2i_of_void *)q_d2i_X509,(char *)x509)
 
369
#else
 
370
X509 *q_X509_dup(X509 *a);
 
371
#endif
 
372
void q_X509_print(BIO *a, X509*b);
 
373
ASN1_OBJECT *q_X509_EXTENSION_get_object(X509_EXTENSION *a);
 
374
void q_X509_free(X509 *a);
 
375
X509_EXTENSION *q_X509_get_ext(X509 *a, int b);
 
376
int q_X509_get_ext_count(X509 *a);
 
377
void *q_X509_get_ext_d2i(X509 *a, int b, int *c, int *d);
 
378
const X509V3_EXT_METHOD *q_X509V3_EXT_get(X509_EXTENSION *a);
 
379
void *q_X509V3_EXT_d2i(X509_EXTENSION *a);
 
380
int q_X509_EXTENSION_get_critical(X509_EXTENSION *a);
 
381
ASN1_OCTET_STRING *q_X509_EXTENSION_get_data(X509_EXTENSION *a);
 
382
void q_BASIC_CONSTRAINTS_free(BASIC_CONSTRAINTS *a);
 
383
void q_AUTHORITY_KEYID_free(AUTHORITY_KEYID *a);
 
384
int q_ASN1_STRING_print(BIO *a, const ASN1_STRING *b);
 
385
X509_NAME *q_X509_get_issuer_name(X509 *a);
 
386
X509_NAME *q_X509_get_subject_name(X509 *a);
 
387
int q_X509_verify_cert(X509_STORE_CTX *ctx);
 
388
int q_X509_NAME_entry_count(X509_NAME *a);
 
389
X509_NAME_ENTRY *q_X509_NAME_get_entry(X509_NAME *a,int b);
 
390
ASN1_STRING *q_X509_NAME_ENTRY_get_data(X509_NAME_ENTRY *a);
 
391
ASN1_OBJECT *q_X509_NAME_ENTRY_get_object(X509_NAME_ENTRY *a);
 
392
EVP_PKEY *q_X509_PUBKEY_get(X509_PUBKEY *a);
 
393
void q_X509_STORE_free(X509_STORE *store);
 
394
X509_STORE *q_X509_STORE_new();
 
395
int q_X509_STORE_add_cert(X509_STORE *ctx, X509 *x);
 
396
void q_X509_STORE_CTX_free(X509_STORE_CTX *storeCtx);
 
397
int q_X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store,
 
398
                          X509 *x509, STACK_OF(X509) *chain);
 
399
X509_STORE_CTX *q_X509_STORE_CTX_new();
 
400
int q_X509_STORE_CTX_set_purpose(X509_STORE_CTX *ctx, int purpose);
 
401
int q_X509_STORE_CTX_get_error(X509_STORE_CTX *ctx);
 
402
int q_X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx);
 
403
X509 *q_X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx);
 
404
STACK_OF(X509) *q_X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx);
 
405
 
 
406
#define q_BIO_get_mem_data(b, pp) (int)q_BIO_ctrl(b,BIO_CTRL_INFO,0,(char *)pp)
 
407
#define q_BIO_pending(b) (int)q_BIO_ctrl(b,BIO_CTRL_PENDING,0,NULL)
 
408
#ifdef SSLEAY_MACROS
 
409
int     q_i2d_DSAPrivateKey(const DSA *a, unsigned char **pp);
 
410
int     q_i2d_RSAPrivateKey(const RSA *a, unsigned char **pp);
 
411
RSA *q_d2i_RSAPrivateKey(RSA **a, unsigned char **pp, long length);
 
412
DSA *q_d2i_DSAPrivateKey(DSA **a, unsigned char **pp, long length);
 
413
#define q_PEM_read_bio_RSAPrivateKey(bp, x, cb, u) \
 
414
        (RSA *)q_PEM_ASN1_read_bio( \
 
415
        (void *(*)(void**, const unsigned char**, long int))q_d2i_RSAPrivateKey, PEM_STRING_RSA, bp, (void **)x, cb, u)
 
416
#define q_PEM_read_bio_DSAPrivateKey(bp, x, cb, u) \
 
417
        (DSA *)q_PEM_ASN1_read_bio( \
 
418
        (void *(*)(void**, const unsigned char**, long int))q_d2i_DSAPrivateKey, PEM_STRING_DSA, bp, (void **)x, cb, u)
 
419
#define q_PEM_write_bio_RSAPrivateKey(bp,x,enc,kstr,klen,cb,u) \
 
420
                PEM_ASN1_write_bio((int (*)(void*, unsigned char**))q_i2d_RSAPrivateKey,PEM_STRING_RSA,\
 
421
                        bp,(char *)x,enc,kstr,klen,cb,u)
 
422
#define q_PEM_write_bio_DSAPrivateKey(bp,x,enc,kstr,klen,cb,u) \
 
423
                PEM_ASN1_write_bio((int (*)(void*, unsigned char**))q_i2d_DSAPrivateKey,PEM_STRING_DSA,\
 
424
                        bp,(char *)x,enc,kstr,klen,cb,u)
 
425
#endif
 
426
#define q_SSL_CTX_set_options(ctx,op) q_SSL_CTX_ctrl((ctx),SSL_CTRL_OPTIONS,(op),NULL)
 
427
#define q_SSL_CTX_set_mode(ctx,op) q_SSL_CTX_ctrl((ctx),SSL_CTRL_MODE,(op),NULL)
 
428
#define q_SKM_sk_num(type, st) ((int (*)(const STACK_OF(type) *))q_sk_num)(st)
 
429
#define q_SKM_sk_value(type, st,i) ((type * (*)(const STACK_OF(type) *, int))q_sk_value)(st, i)
 
430
#define q_sk_GENERAL_NAME_num(st) q_SKM_sk_num(GENERAL_NAME, (st))
 
431
#define q_sk_GENERAL_NAME_value(st, i) q_SKM_sk_value(GENERAL_NAME, (st), (i))
 
432
#define q_sk_X509_num(st) q_SKM_sk_num(X509, (st))
 
433
#define q_sk_X509_value(st, i) q_SKM_sk_value(X509, (st), (i))
 
434
#define q_sk_SSL_CIPHER_num(st) q_SKM_sk_num(SSL_CIPHER, (st))
 
435
#define q_sk_SSL_CIPHER_value(st, i) q_SKM_sk_value(SSL_CIPHER, (st), (i))
 
436
#define q_SSL_CTX_add_extra_chain_cert(ctx,x509) \
 
437
        q_SSL_CTX_ctrl(ctx,SSL_CTRL_EXTRA_CHAIN_CERT,0,(char *)x509)
 
438
#define q_X509_get_notAfter(x) X509_get_notAfter(x)
 
439
#define q_X509_get_notBefore(x) X509_get_notBefore(x)
 
440
#define q_EVP_PKEY_assign_RSA(pkey,rsa) q_EVP_PKEY_assign((pkey),EVP_PKEY_RSA,\
 
441
                                        (char *)(rsa))
 
442
#define q_EVP_PKEY_assign_DSA(pkey,dsa) q_EVP_PKEY_assign((pkey),EVP_PKEY_DSA,\
 
443
                                        (char *)(dsa))
 
444
#define q_OpenSSL_add_all_algorithms() q_OPENSSL_add_all_algorithms_conf()
 
445
void q_OPENSSL_add_all_algorithms_noconf();
 
446
void q_OPENSSL_add_all_algorithms_conf();
 
447
int q_SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile, const char *CApath);
 
448
long q_SSLeay();
 
449
const char *q_SSLeay_version(int type);
 
450
 
 
451
// Helper function
 
452
class QDateTime;
 
453
QDateTime q_getTimeFromASN1(const ASN1_TIME *aTime);
 
454
 
 
455
QT_END_NAMESPACE
 
456
 
 
457
#endif