summaryrefslogtreecommitdiff
path: root/vchat-ssl.h
diff options
context:
space:
mode:
Diffstat (limited to 'vchat-ssl.h')
-rwxr-xr-xvchat-ssl.h42
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
4typedef int (*vc_x509verify_cb_t)(int, X509_STORE_CTX *); 4struct vc_x509store_t;
5typedef struct vc_x509store_t vc_x509store_t;
5typedef int (*vc_askpass_cb_t)(char *, int, int, void *); 6typedef int (*vc_askpass_cb_t)(char *, int, int, void *);
6typedef 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
23int vc_connect_ssl(BIO **conn, vc_x509store_t * ); 8vc_x509store_t *vc_init_x509store();
24SSL_CTX * vc_create_sslctx( vc_x509store_t *); 9void vc_x509store_set_pkeycb(vc_x509store_t *, vc_askpass_cb_t);
25void vc_init_x509store(vc_x509store_t *);
26void vc_cleanup_x509store(vc_x509store_t *);
27void vc_x509store_setcafile(vc_x509store_t *, char *);
28void vc_x509store_setcapath(vc_x509store_t *, char *);
29void vc_x509store_setcrlfile(vc_x509store_t *, char *);
30void vc_x509store_setkeyfile(vc_x509store_t *, char *);
31void vc_x509store_setcertfile(vc_x509store_t *, char *);
32void vc_x509store_addcert(vc_x509store_t *, X509 *);
33void vc_x509store_setcb(vc_x509store_t *, vc_x509verify_cb_t);
34void vc_x509store_set_pkeycb(vc_x509store_t *, vc_askpass_cb_t);
35void vc_x509store_setflags(vc_x509store_t *, int); 10void vc_x509store_setflags(vc_x509store_t *, int);
36void vc_x509store_clearflags(vc_x509store_t *, int); 11void vc_x509store_setkeyfile(vc_x509store_t *, char *);
37int vc_verify_callback(int, X509_STORE_CTX *); 12void vc_x509store_setcertfile(vc_x509store_t *, char *);
38X509_STORE * vc_x509store_create(vc_x509store_t *); 13int vc_connect_ssl(BIO **conn, vc_x509store_t * );
39char *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