diff options
author | Dirk Engling <erdgeist@erdgeist.org> | 2014-11-16 00:31:32 +0100 |
---|---|---|
committer | Dirk Engling <erdgeist@erdgeist.org> | 2014-11-16 00:31:32 +0100 |
commit | 4c635b85709b33f5161674fcea273d5739d484fe (patch) | |
tree | 50d8d6b398cc91c10109d12f6c2638c94e6814e5 /vchat-ssl.h | |
parent | 279772cb4f3894f087b9e0389c6742c6ebb48062 (diff) |
Keep pulling openssl's tentacles out of protocol code
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 |