diff options
Diffstat (limited to 'vchat-ssl.h')
-rwxr-xr-x | vchat-ssl.h | 42 |
1 files changed, 8 insertions, 34 deletions
diff --git a/vchat-ssl.h b/vchat-ssl.h index 12d5fdb..8dc1bfc 100755 --- a/vchat-ssl.h +++ b/vchat-ssl.h | |||
@@ -1,42 +1,16 @@ | |||
1 | 1 | ||
2 | /* types */ | 2 | /* prototypes */ |
3 | 3 | ||
4 | typedef int (*vc_x509verify_cb_t)(int, X509_STORE_CTX *); | 4 | struct vc_x509store_t; |
5 | typedef struct vc_x509store_t vc_x509store_t; | ||
5 | typedef int (*vc_askpass_cb_t)(char *, int, int, void *); | 6 | typedef int (*vc_askpass_cb_t)(char *, int, int, void *); |
6 | typedef struct { | ||
7 | char *cafile; | ||
8 | char *capath; | ||
9 | char *crlfile; | ||
10 | vc_x509verify_cb_t callback; | ||
11 | vc_askpass_cb_t askpass_callback; | ||
12 | STACK_OF(X509) *certs; | ||
13 | STACK_OF(X509_CRL) *crls; | ||
14 | char *use_certfile; | ||
15 | STACK_OF(X509) *use_certs; | ||
16 | char *use_keyfile; | ||
17 | EVP_PKEY *use_key; | ||
18 | int flags; | ||
19 | } vc_x509store_t; | ||
20 | |||
21 | /* prototypes */ | ||
22 | 7 | ||
23 | int vc_connect_ssl(BIO **conn, vc_x509store_t * ); | 8 | vc_x509store_t *vc_init_x509store(); |
24 | SSL_CTX * vc_create_sslctx( vc_x509store_t *); | 9 | void vc_x509store_set_pkeycb(vc_x509store_t *, vc_askpass_cb_t); |
25 | void vc_init_x509store(vc_x509store_t *); | ||
26 | void vc_cleanup_x509store(vc_x509store_t *); | ||
27 | void vc_x509store_setcafile(vc_x509store_t *, char *); | ||
28 | void vc_x509store_setcapath(vc_x509store_t *, char *); | ||
29 | void vc_x509store_setcrlfile(vc_x509store_t *, char *); | ||
30 | void vc_x509store_setkeyfile(vc_x509store_t *, char *); | ||
31 | void vc_x509store_setcertfile(vc_x509store_t *, char *); | ||
32 | void vc_x509store_addcert(vc_x509store_t *, X509 *); | ||
33 | void vc_x509store_setcb(vc_x509store_t *, vc_x509verify_cb_t); | ||
34 | void vc_x509store_set_pkeycb(vc_x509store_t *, vc_askpass_cb_t); | ||
35 | void vc_x509store_setflags(vc_x509store_t *, int); | 10 | void vc_x509store_setflags(vc_x509store_t *, int); |
36 | void vc_x509store_clearflags(vc_x509store_t *, int); | 11 | void vc_x509store_setkeyfile(vc_x509store_t *, char *); |
37 | int vc_verify_callback(int, X509_STORE_CTX *); | 12 | void vc_x509store_setcertfile(vc_x509store_t *, char *); |
38 | X509_STORE * vc_x509store_create(vc_x509store_t *); | 13 | int vc_connect_ssl(BIO **conn, vc_x509store_t * ); |
39 | char *vc_ssl_version(char *, int); | ||
40 | 14 | ||
41 | #define VC_X509S_NODEF_CAFILE 0x01 | 15 | #define VC_X509S_NODEF_CAFILE 0x01 |
42 | #define VC_X509S_NODEF_CAPATH 0x02 | 16 | #define VC_X509S_NODEF_CAPATH 0x02 |