#ifndef HEADER_TLS_H
#define HEADER_TLS_H
#ifndef HEADER_SSL_H
typedef struct ssl_ctx_st SSL_CTX;
#endif
#define TLS_INFO_SIZE 512
void tls_set_dhe1024(int i, void* apparg);
void tls_rand_seed(void);
int tls_rand_seed_from_file(const char *filename, size_t n, void *apparg);
void tls_rand_seed_from_memory(const void *buf, size_t n);
struct tls_create_ctx_args
{
int client_p;
const char *certificate_file;
const char *key_file;
const char *ca_file;
int verify_depth;
int fail_unless_verified;
int export_p;
};
struct tls_create_ctx_args tls_create_ctx_defaultargs(void);
SSL_CTX *tls_create_ctx(struct tls_create_ctx_args, void *apparg);
struct tls_start_proxy_args
{
int fd;
int client_p;
SSL_CTX *ctx;
pid_t *pid;
int *infofd;
};
struct tls_start_proxy_args tls_start_proxy_defaultargs(void);
int tls_start_proxy(struct tls_start_proxy_args, void *apparg);
#endif