52 #ifndef _ASTERISK_TCPTLS_H
53 #define _ASTERISK_TCPTLS_H
56 #include <sys/param.h>
63 #define AST_CERTFILE "asterisk.pem"
140 void *(*accept_fn)(
void *);
142 void *(*worker_fn)(
void *);
197 void *ast_tcptls_server_root(
void *);
void(* periodic_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.
arguments for the accepting thread
Socket address structure.
describes a server instance
Support for dynamic strings.
Generic abstraction for input/output streams.
struct ast_sockaddr old_address
Structure used to handle boolean flags.
struct ast_tls_config * old_tls_cfg
struct ast_iostream * stream
struct ast_tcptls_session_instance * ast_tcptls_client_start_timeout(struct ast_tcptls_session_instance *tcptls_session, int timeout)
Attempt to connect and start a tcptls session within the given timeout.
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)
Creates a client connection's ast_tcptls_session_instance.
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.
struct ast_tcptls_session_instance * ast_tcptls_client_start(struct ast_tcptls_session_instance *tcptls_session)
Attempt to connect and start a tcptls session.
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
char hostname[MAXHOSTNAMELEN]