00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef _KLONE_TLS_H_
00012 #define _KLONE_TLS_H_
00013
00014 #include "klone_conf.h"
00015 #include <u/libu.h>
00016 #ifdef HAVE_LIBOPENSSL
00017 #include <openssl/ssl.h>
00018
00019 #ifdef __cplusplus
00020 extern "C" {
00021 #endif
00022
00023
00024 struct tls_rand_seed_s
00025 {
00026 pid_t pid;
00027 long t1, t2;
00028 void *stack;
00029 };
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 *dh;
00043 int depth;
00044 int vmode;
00045 };
00046
00047 typedef struct tls_rand_seed_s tls_rand_seed_t;
00048 typedef struct tls_ctx_args_s tls_ctx_args_t;
00049
00050
00051 SSL_CTX *tls_init_ctx (tls_ctx_args_t *);
00052 int tls_load_ctx_args(u_config_t *, tls_ctx_args_t **);
00053 char *tls_get_error (void);
00054
00055 #ifdef __cplusplus
00056 }
00057 #endif
00058
00059 #endif
00060
00061 #endif