28#define HITLS_IDENTITY_HINT_MAX_SIZE 128
29#define HITLS_PSK_FIND_SESSION_CB_SUCCESS 1
30#define HITLS_PSK_FIND_SESSION_CB_FAIL 0
31#define HITLS_PSK_USE_SESSION_CB_SUCCESS 1
32#define HITLS_PSK_USE_SESSION_CB_FAIL 0
47 uint8_t *psk, uint32_t maxPskLen);
struct TlsSessCtx HITLS_Session
Definition hitls_type.h:42
int32_t(* HITLS_PskUseSessionCb)(HITLS_Ctx *ctx, uint32_t hashAlgo, const uint8_t **id, uint32_t *idLen, HITLS_Session **session)
TLS1.3 client PSK negotiation callback
Definition hitls_psk.h:87
int32_t HITLS_CFG_SetPskServerCallback(HITLS_Config *config, HITLS_PskServerCb callback)
Set the PSK callback on the server, which is used to obtain the PSK during PSK negotiation.
uint32_t(* HITLS_PskServerCb)(HITLS_Ctx *ctx, const uint8_t *identity, uint8_t *psk, uint32_t maxPskLen)
Obtain the PSK prototype on the server.
Definition hitls_psk.h:59
uint32_t(* HITLS_PskClientCb)(HITLS_Ctx *ctx, const uint8_t *hint, uint8_t *identity, uint32_t maxIdentityLen, uint8_t *psk, uint32_t maxPskLen)
Obtain the PSK prototype on the client.
Definition hitls_psk.h:46
int32_t HITLS_SetPskFindSessionCallback(HITLS_Ctx *ctx, HITLS_PskFindSessionCb cb)
Set the server callback, which is used to restore the PSK session of TLS1.3, cb can be NULL.
int32_t HITLS_SetPskClientCallback(HITLS_Ctx *ctx, HITLS_PskClientCb cb)
Set the PSK callback function on the client, which is used to obtain the identity and PSK
int32_t HITLS_SetPskUseSessionCallback(HITLS_Ctx *ctx, HITLS_PskUseSessionCb cb)
Set the client callback, which is used to restore the PSK session of TLS1.3, cb can be NULL.
int32_t(* HITLS_PskFindSessionCb)(HITLS_Ctx *ctx, const uint8_t *identity, uint32_t identityLen, HITLS_Session **session)
TLS1.3 server PSK negotiation callback
Definition hitls_psk.h:72
int32_t HITLS_SetPskServerCallback(HITLS_Ctx *ctx, HITLS_PskServerCb cb)
Set the PSK callback on the server, which is used to obtain the PSK during PSK negotiation.
int32_t HITLS_CFG_SetPskFindSessionCallback(HITLS_Config *config, HITLS_PskFindSessionCb callback)
Set the server callback, which is used to restore the PSK session of TLS1.3, cb can be NULL.
int32_t HITLS_CFG_SetPskIdentityHint(HITLS_Config *config, const uint8_t *hint, uint32_t hintSize)
Set the PSK prompt information for PSK negotiation.
int32_t HITLS_CFG_SetPskClientCallback(HITLS_Config *config, HITLS_PskClientCb callback)
Set the PSK callback function on the client, which is used to obtain the identity
int32_t HITLS_SetPskIdentityHint(HITLS_Ctx *ctx, const uint8_t *identityHint, uint32_t identityHintLen)
Set the PSK identity hint on the server, which is used to provide identity hints for the
int32_t HITLS_CFG_SetPskUseSessionCallback(HITLS_Config *config, HITLS_PskUseSessionCb callback)
Set the server callback, which is used to restore the PSK session of TLS1.3, cb can be NULL.
struct TlsCtx HITLS_Ctx
HITLS context
Definition hitls_type.h:28
struct TlsConfig HITLS_Config
config context
Definition hitls_type.h:34