summaryrefslogtreecommitdiff
path: root/vchat-ssl.h
diff options
context:
space:
mode:
authorerdgeist <>2010-08-27 13:20:16 +0000
committererdgeist <>2010-08-27 13:20:16 +0000
commitedad5cf6e2b7604204d6246be5fe6b6dd8532fa0 (patch)
treed47c713620fcaa097ea66c19b285bb8be62c2f03 /vchat-ssl.h
parent6eb716f8db302dcf51113a7f8c99c18ebcb6b07e (diff)
Tidy up ssl code, move all ssl related stuff to vchat-ssl and clean up some wrinkles in cert verification
Diffstat (limited to 'vchat-ssl.h')
-rwxr-xr-xvchat-ssl.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/vchat-ssl.h b/vchat-ssl.h
index c745c97..baaa3c4 100755
--- a/vchat-ssl.h
+++ b/vchat-ssl.h
@@ -16,12 +16,11 @@ typedef struct {
16 char *use_keyfile; 16 char *use_keyfile;
17 EVP_PKEY *use_key; 17 EVP_PKEY *use_key;
18 int flags; 18 int flags;
19 int ignore_ssl;
20} vc_x509store_t; 19} vc_x509store_t;
21 20
22/* prototypes */ 21/* prototypes */
23 22
24int vc_connect_ssl(BIO **conn, vc_x509store_t *, SSL_CTX **); 23int vc_connect_ssl(BIO **conn, vc_x509store_t * );
25SSL_CTX * vc_create_sslctx( vc_x509store_t *); 24SSL_CTX * vc_create_sslctx( vc_x509store_t *);
26void vc_init_x509store(vc_x509store_t *); 25void vc_init_x509store(vc_x509store_t *);
27void vc_cleanup_x509store(vc_x509store_t *); 26void vc_cleanup_x509store(vc_x509store_t *);
@@ -34,15 +33,12 @@ void vc_x509store_addcert(vc_x509store_t *, X509 *);
34void vc_x509store_setcb(vc_x509store_t *, vc_x509verify_cb_t); 33void vc_x509store_setcb(vc_x509store_t *, vc_x509verify_cb_t);
35void vc_x509store_set_pkeycb(vc_x509store_t *, vc_askpass_cb_t); 34void vc_x509store_set_pkeycb(vc_x509store_t *, vc_askpass_cb_t);
36void vc_x509store_setflags(vc_x509store_t *, int); 35void vc_x509store_setflags(vc_x509store_t *, int);
37void vc_x509store_setignssl(vc_x509store_t *, int);
38void vc_x509store_clearflags(vc_x509store_t *, int); 36void vc_x509store_clearflags(vc_x509store_t *, int);
39int vc_verify_cert(X509 *, vc_x509store_t *);
40int vc_verify_cert_hostname(X509 *, char *);
41int vc_verify_callback(int, X509_STORE_CTX *); 37int vc_verify_callback(int, X509_STORE_CTX *);
42X509_STORE * vc_x509store_create(vc_x509store_t *); 38X509_STORE * vc_x509store_create(vc_x509store_t *);
43 39
44#define VC_X509S_NODEF_CAFILE 0x01 40#define VC_X509S_NODEF_CAFILE 0x01
45#define VC_X509S_NODEF_CAPATH 0x02 41#define VC_X509S_NODEF_CAPATH 0x02
46#define VC_X509S_USE_CERTIFICATE 0x04 42#define VC_X509S_USE_CERTIFICATE 0x04
47#define VC_X509S_SSL_VERIFY_NONE 0x10 43#define VC_X509S_SSL_VERIFY_NONE 0x10
48#define VC_X509S_SSL_VERIFY_PEER 0x20 44#define VC_X509S_SSL_VERIFY_PEER 0x20