29#include <mstdlib/base/m_defs.h>
30#include <mstdlib/base/m_types.h>
44struct M_tls_clientctx;
47struct M_tls_serverctx;
enum M_io_error M_io_error_t
Definition: m_io.h:93
struct M_io M_io_t
Definition: m_io.h:59
struct M_list_str M_list_str_t
Definition: m_list_str.h:80
M_bool M_tls_clientctx_set_default_trust(M_tls_clientctx_t *ctx)
M_bool M_tls_serverctx_set_dhparam(M_tls_serverctx_t *ctx, const unsigned char *dhparam, size_t dhparam_len)
M_bool M_tls_serverctx_add_trust_crl_file(M_tls_serverctx_t *ctx, const char *path)
M_bool M_tls_serverctx_set_protocols(M_tls_serverctx_t *ctx, int protocols)
M_bool M_tls_clientctx_set_ciphers(M_tls_clientctx_t *ctx, const char *ciphers)
M_bool M_tls_serverctx_set_server_preference(M_tls_serverctx_t *ctx, M_bool tf)
M_bool M_tls_serverctx_set_trust_cert_file(M_tls_serverctx_t *ctx, const char *path)
M_bool M_tls_serverctx_upref(M_tls_serverctx_t *ctx)
size_t M_tls_serverctx_SNI_count(M_tls_serverctx_t *ctx)
const char * M_tls_get_cipher(M_io_t *io, size_t id)
const char * M_tls_protocols_to_str(M_tls_protocols_t protocol)
char * M_tls_get_application(M_io_t *io, size_t id)
M_bool M_tls_serverctx_SNI_ctx_add(M_tls_serverctx_t *ctx, M_tls_serverctx_t *child)
M_bool M_tls_clientctx_set_verify_level(M_tls_clientctx_t *ctx, M_tls_verify_level_t level)
M_bool M_tls_get_sessionreused(M_io_t *io, size_t id)
M_uint64 M_tls_get_negotiation_time_ms(M_io_t *io, size_t id)
M_bool M_tls_clientctx_set_trust_cert(M_tls_clientctx_t *ctx, const unsigned char *crt, size_t len)
M_bool M_tls_clientctx_set_cert_files(M_tls_clientctx_t *ctx, const char *keypath, const char *crtpath, const char *intermediatepath)
M_tls_serverctx_t * M_tls_serverctx_create_from_files(const char *keypath, const char *crtpath, const char *intermediatepath)
M_bool M_tls_serverctx_set_trust_ca(M_tls_serverctx_t *ctx, const unsigned char *ca, size_t len)
M_bool M_tls_clientctx_set_applications(M_tls_clientctx_t *ctx, M_list_str_t *applications)
M_bool M_tls_clientctx_set_negotiation_timeout_ms(M_tls_clientctx_t *ctx, M_uint64 timeout_ms)
M_bool M_tls_clientctx_upref(M_tls_clientctx_t *ctx)
M_tls_serverctx_t * M_tls_serverctx_SNI_at(M_tls_serverctx_t *ctx, size_t idx)
void M_tls_serverctx_destroy(M_tls_serverctx_t *ctx)
M_bool M_tls_serverctx_set_negotiation_timeout_ms(M_tls_serverctx_t *ctx, M_uint64 timeout_ms)
M_tls_clientctx_t * M_tls_clientctx_create(void)
M_bool M_tls_clientctx_set_cert(M_tls_clientctx_t *ctx, const unsigned char *key, size_t key_len, const unsigned char *crt, size_t crt_len, const unsigned char *intermediate, size_t intermediate_len)
M_tls_verify_level_t
Definition: m_tls.h:68
M_bool M_tls_clientctx_set_trust_ca_file(M_tls_clientctx_t *ctx, const char *path)
const char * M_tls_server_get_hostname(M_io_t *io, size_t id)
M_bool M_tls_serverctx_set_ciphers(M_tls_serverctx_t *ctx, const char *ciphers)
M_bool M_tls_serverctx_set_trust_ca_file(M_tls_serverctx_t *ctx, const char *path)
M_io_error_t M_io_tls_server_add(M_io_t *io, M_tls_serverctx_t *ctx, size_t *layer_id)
struct M_tls_clientctx M_tls_clientctx_t
Definition: m_tls.h:45
char * M_tls_serverctx_get_cert(M_tls_serverctx_t *ctx)
M_bool M_tls_clientctx_set_trust_ca(M_tls_clientctx_t *ctx, const unsigned char *ca, size_t len)
M_bool M_tls_serverctx_add_trust_crl(M_tls_serverctx_t *ctx, const unsigned char *crl, size_t len)
M_bool M_tls_clientctx_set_trust_ca_dir(M_tls_clientctx_t *ctx, const char *path)
char * M_tls_serverctx_get_cipherlist(M_tls_serverctx_t *ctx)
struct M_tls_serverctx M_tls_serverctx_t
Definition: m_tls.h:48
M_bool M_tls_clientctx_set_session_resumption(M_tls_clientctx_t *ctx, M_bool enable)
M_tls_protocols_t M_tls_protocols_from_str(const char *protocols_str)
M_tls_protocols_t M_tls_get_protocol(M_io_t *io, size_t id)
M_tls_protocols_t
Definition: m_tls.h:52
M_bool M_tls_serverctx_set_trust_ca_dir(M_tls_serverctx_t *ctx, const char *path)
M_tls_init_t
Definition: m_tls.h:85
M_io_error_t M_io_tls_client_add(M_io_t *io, M_tls_clientctx_t *ctx, const char *hostname, size_t *layer_id)
M_bool M_tls_serverctx_set_session_resumption(M_tls_serverctx_t *ctx, M_bool enable)
M_tls_serverctx_t * M_tls_serverctx_SNI_lookup(M_tls_serverctx_t *ctx, const char *hostname)
M_bool M_tls_clientctx_set_protocols(M_tls_clientctx_t *ctx, int protocols)
char * M_tls_get_peer_cert(M_io_t *io, size_t id)
M_bool M_tls_serverctx_set_dhparam_file(M_tls_serverctx_t *ctx, const char *dhparam_path)
void M_tls_init(M_tls_init_t type)
char * M_tls_clientctx_get_cipherlist(M_tls_clientctx_t *ctx)
M_bool M_tls_clientctx_set_trust_cert_file(M_tls_clientctx_t *ctx, const char *path)
void M_tls_clientctx_destroy(M_tls_clientctx_t *ctx)
M_bool M_tls_serverctx_set_trust_cert(M_tls_serverctx_t *ctx, const unsigned char *crt, size_t len)
M_bool M_tls_serverctx_set_applications(M_tls_serverctx_t *ctx, M_list_str_t *applications)
M_tls_serverctx_t * M_tls_serverctx_create(const unsigned char *key, size_t key_len, const unsigned char *crt, size_t crt_len, const unsigned char *intermediate, size_t intermediate_len)
@ M_TLS_VERIFY_NONE
Definition: m_tls.h:69
@ M_TLS_VERIFY_CERT_FUZZY
Definition: m_tls.h:71
@ M_TLS_VERIFY_FULL
Definition: m_tls.h:74
@ M_TLS_VERIFY_CERT_ONLY
Definition: m_tls.h:70
@ M_TLS_PROTOCOL_TLSv1_2
Definition: m_tls.h:56
@ M_TLS_PROTOCOL_TLSv1_1
Definition: m_tls.h:55
@ M_TLS_PROTOCOL_INVALID
Definition: m_tls.h:53
@ M_TLS_PROTOCOL_TLSv1_3
Definition: m_tls.h:57
@ M_TLS_PROTOCOL_DEFAULT
Definition: m_tls.h:58
@ M_TLS_PROTOCOL_TLSv1_0
Definition: m_tls.h:54
@ M_TLS_INIT_EXTERNAL
Definition: m_tls.h:87
@ M_TLS_INIT_NORMAL
Definition: m_tls.h:86