00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef _KLONE_TLS_PRV_H_
00012 #define _KLONE_TLS_PRV_H_
00013
00014 #include "klone_conf.h"
00015 #ifdef HAVE_LIBOPENSSL
00016
00017 #ifdef __cplusplus
00018 extern "C" {
00019 #endif
00020
00021
00022 struct tls_rand_seed_s
00023 {
00024 pid_t pid;
00025 long t1, t2;
00026 void *stack;
00027 };
00028
00029 typedef struct tls_rand_seed_s tls_rand_seed_t;
00030
00031
00032
00033
00034
00035
00036 struct tls_ctx_args_s
00037 {
00038 const char *cert;
00039 const char *key;
00040 const char *certchain;
00041 const char *ca;
00042 const char *crl;
00043 const char *dh;
00044 int crlopts;
00045 int depth;
00046 int vmode;
00047 };
00048
00049 typedef struct tls_ctx_args_s tls_ctx_args_t;
00050
00051
00052 DH *get_dh1024 (void);
00053 BIO *bio_from_emb (const char *);
00054 int tls_load_verify_locations(SSL_CTX *, const char *);
00055 int tls_use_certificate_file(SSL_CTX *, const char *, int);
00056 int tls_use_PrivateKey_file(SSL_CTX *, const char *, int);
00057 int tls_use_certificate_chain(SSL_CTX *, const char *, int,
00058 int (*)(char *, int, int, void *));
00059 int tls_use_crls (SSL_CTX *ctx, tls_ctx_args_t *cargs);
00060 BIO *tls_get_file_bio(const char *res_name);
00061 STACK_OF(X509_NAME) *tls_load_client_CA_file(const char *);
00062 int tls_verify_cb (int ok, X509_STORE_CTX *ctx);
00063 char *tls_get_error (void);
00064
00065 #ifdef __cplusplus
00066 }
00067 #endif
00068
00069 #endif
00070 #endif