diff options
author | erdgeist <> | 2010-08-27 13:20:16 +0000 |
---|---|---|
committer | erdgeist <> | 2010-08-27 13:20:16 +0000 |
commit | edad5cf6e2b7604204d6246be5fe6b6dd8532fa0 (patch) | |
tree | d47c713620fcaa097ea66c19b285bb8be62c2f03 /vchat-ssl.h | |
parent | 6eb716f8db302dcf51113a7f8c99c18ebcb6b07e (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-x | vchat-ssl.h | 8 |
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 | ||
24 | int vc_connect_ssl(BIO **conn, vc_x509store_t *, SSL_CTX **); | 23 | int vc_connect_ssl(BIO **conn, vc_x509store_t * ); |
25 | SSL_CTX * vc_create_sslctx( vc_x509store_t *); | 24 | SSL_CTX * vc_create_sslctx( vc_x509store_t *); |
26 | void vc_init_x509store(vc_x509store_t *); | 25 | void vc_init_x509store(vc_x509store_t *); |
27 | void vc_cleanup_x509store(vc_x509store_t *); | 26 | void vc_cleanup_x509store(vc_x509store_t *); |
@@ -34,15 +33,12 @@ void vc_x509store_addcert(vc_x509store_t *, X509 *); | |||
34 | void vc_x509store_setcb(vc_x509store_t *, vc_x509verify_cb_t); | 33 | void vc_x509store_setcb(vc_x509store_t *, vc_x509verify_cb_t); |
35 | void vc_x509store_set_pkeycb(vc_x509store_t *, vc_askpass_cb_t); | 34 | void vc_x509store_set_pkeycb(vc_x509store_t *, vc_askpass_cb_t); |
36 | void vc_x509store_setflags(vc_x509store_t *, int); | 35 | void vc_x509store_setflags(vc_x509store_t *, int); |
37 | void vc_x509store_setignssl(vc_x509store_t *, int); | ||
38 | void vc_x509store_clearflags(vc_x509store_t *, int); | 36 | void vc_x509store_clearflags(vc_x509store_t *, int); |
39 | int vc_verify_cert(X509 *, vc_x509store_t *); | ||
40 | int vc_verify_cert_hostname(X509 *, char *); | ||
41 | int vc_verify_callback(int, X509_STORE_CTX *); | 37 | int vc_verify_callback(int, X509_STORE_CTX *); |
42 | X509_STORE * vc_x509store_create(vc_x509store_t *); | 38 | X509_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 |