52#ifndef _ASTERISK_TCPTLS_H
53#define _ASTERISK_TCPTLS_H
63#define AST_CERTFILE "asterisk.pem"
140 void *(*accept_fn)(
void *);
142 void *(*worker_fn)(
void *);
Generic abstraction for input/output streams.
struct ssl_ctx_st SSL_CTX
Structure used to handle boolean flags.
Socket address structure.
Support for dynamic strings.
arguments for the accepting thread
struct ast_tls_config * old_tls_cfg
void(* periodic_fn)(void *)
struct ast_sockaddr local_address
struct ast_sockaddr remote_address
struct ast_sockaddr old_address
struct ast_tls_config * tls_cfg
char hostname[MAXHOSTNAMELEN]
describes a server instance
struct ast_iostream * stream
struct ast_sockaddr remote_address
struct ast_tcptls_session_args * parent
struct ast_str * overflow_buf
void * ast_tcptls_server_root(void *)
void ast_tcptls_server_stop(struct ast_tcptls_session_args *desc)
Shutdown a running server if there is one.
int ast_ssl_setup(struct ast_tls_config *cfg)
Set up an SSL server.
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
struct ast_tcptls_session_instance * ast_tcptls_client_create(struct ast_tcptls_session_args *desc)
Creates a client connection's ast_tcptls_session_instance.
@ AST_SSL_DONT_VERIFY_SERVER
@ AST_SSL_IGNORE_COMMON_NAME
@ AST_SSL_SERVER_CIPHER_ORDER
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.
struct ast_tcptls_session_instance * ast_tcptls_client_start(struct ast_tcptls_session_instance *tcptls_session)
Attempt to connect and start a tcptls session.
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.
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...