36#define HITLS_ACCEPT_SNI_ERR_OK 0
37#define HITLS_ACCEPT_SNI_ERR_ALERT_FATAL 2
38#define HITLS_ACCEPT_SNI_ERR_NOACK 3
int32_t HITLS_CFG_SetServerNameCb(HITLS_Config *config, HITLS_SniDealCb callback)
Set the server_name callback function on the server, which is used for SNI negotiation,...
int32_t HITLS_CFG_GetServerNameArg(HITLS_Config *config, void **arg)
Obtain the server_name required during SNI negotiation on the server, related Parameter arg.
int32_t HITLS_CFG_SetServerNameArg(HITLS_Config *config, void *arg)
Set the server_name parameters required during SNI negotiation on the server.
int32_t HITLS_GetServernameType(const HITLS_Ctx *ctx)
Obtain the server_name type before, during, or after the handshake on the client or server.
int32_t HITLS_CFG_GetServerName(HITLS_Config *config, uint8_t **serverName, uint32_t *serverNameStrlen)
Obtain the value of server_name configured on the client.
int32_t(* HITLS_SniDealCb)(HITLS_Ctx *ctx, int *alert, void *arg)
Set the extension prototype for the server to process Client Hello server_name.
Definition hitls_sni.h:97
SNI_Type
Currently, the SNI supports only the host name type.
Definition hitls_sni.h:31
@ HITLS_SNI_BUTT
Definition hitls_sni.h:33
@ HITLS_SNI_HOSTNAME_TYPE
Definition hitls_sni.h:32
int32_t HITLS_CFG_SetServerName(HITLS_Config *config, uint8_t *serverName, uint32_t serverNameStrlen)
Set server_name.
int32_t HITLS_CFG_GetServerNameCb(HITLS_Config *config, HITLS_SniDealCb *callback)
Obtain the server_name callback settings on the server.
const char * HITLS_GetServerName(const HITLS_Ctx *ctx, const int type)
Obtain the value of server_name before, during, or after the handshake on the client or server.
struct TlsCtx HITLS_Ctx
HITLS context
Definition hitls_type.h:28
struct TlsConfig HITLS_Config
config context
Definition hitls_type.h:34