51 #ifndef _ASTERISK_TCPTLS_H 52 #define _ASTERISK_TCPTLS_H 55 #include <sys/param.h> 62 #define AST_CERTFILE "asterisk.pem" 139 void *(*accept_fn)(
void *);
140 void (*periodic_fn)(
void *);
141 void *(*worker_fn)(
void *);
void ast_tcptls_server_start(struct ast_tcptls_session_args *desc)
This is a generic (re)start routine for a TCP server, which does the socket/bind/listen and starts a ...
void ast_ssl_teardown(struct ast_tls_config *cfg)
free resources used by an SSL server
int ast_ssl_setup(struct ast_tls_config *cfg)
Set up an SSL server.
struct ast_str * overflow_buf
struct ast_tcptls_session_args * parent
arguments for the accepting thread
Socket address structure.
void * ast_tcptls_server_root(void *)
describes a server instance
The descriptor of a dynamic string XXX storage will be optimized later if needed We use the ts field ...
Generic abstraction for input/output streams.
Structure used to handle boolean flags.
struct ast_tls_config * old_tls_cfg
struct ast_iostream * stream
void ast_tcptls_close_session_file(struct ast_tcptls_session_instance *tcptls_session)
Closes a tcptls session instance's file and/or file descriptor. The tcptls_session will be set to NUL...
struct ast_tcptls_session_instance * ast_tcptls_client_create(struct ast_tcptls_session_args *desc)
int ast_tls_read_conf(struct ast_tls_config *tls_cfg, struct ast_tcptls_session_args *tls_desc, const char *varname, const char *value)
Used to parse conf files containing tls/ssl options.
static struct ast_str * hostname
struct ssl_ctx_st SSL_CTX
struct ast_tcptls_session_instance * ast_tcptls_client_start(struct ast_tcptls_session_instance *tcptls_session)
attempts to connect and start tcptls session, on error the tcptls_session's ref count is decremented...
void ast_tcptls_server_stop(struct ast_tcptls_session_args *desc)
Shutdown a running server if there is one.
struct ast_tls_config * tls_cfg