32int32_t HS_Init(TLS_Ctx *ctx);
39void HS_DeInit(TLS_Ctx *ctx);
49int32_t HS_DoHandshake(TLS_Ctx *ctx);
61int32_t HS_KeyEstablish(TLS_Ctx *ctx,
bool isClient);
71int32_t HS_ResumeKeyEstablish(TLS_Ctx *ctx);
80uint32_t HS_GetState(
const TLS_Ctx *ctx);
89const char *HS_GetStateStr(uint32_t state);
100int32_t HS_CheckKeyUpdateState(TLS_Ctx *ctx, uint32_t updateType);
110const char *HS_GetServerName(
const TLS_Ctx *ctx);
119#ifdef HITLS_TLS_PROTO_DTLS12
120int32_t HS_CheckAndProcess2MslTimeout(TLS_Ctx *ctx);
132int32_t HS_DtlsSendFragmentHsMsg(TLS_Ctx *ctx, uint32_t maxRecPayloadLen,
const uint8_t *msgData);
142bool IsHsSendState(HITLS_HandshakeState state);
144int32_t HS_CheckPostHandshakeAuth(TLS_Ctx *ctx);
146#define TLS_IS_FIRST_HANDSHAKE(ctx) ((ctx)->negotiatedInfo.clientVerifyDataSize == 0 \
147 || (ctx)->negotiatedInfo.serverVerifyDataSize == 0)