25#include "hitls_type.h"
35#define HS_PSK_IDENTITY_MAX_LEN 256u
37#define HS_PSK_MAX_LEN 512u
39#define HITLS_PSK_FIND_SESSION_CB_SUCCESS 1
40#define HITLS_PSK_FIND_SESSION_CB_FAIL 0
41#define HITLS_PSK_USE_SESSION_CB_SUCCESS 1
42#define HITLS_PSK_USE_SESSION_CB_FAIL 0
57 uint8_t *psk, uint32_t maxPskLen);
83 HITLS_Session **session);
98 uint32_t *idLen, HITLS_Session **session);
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
定义 hitls_psk.h:97
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.
定义 hitls_psk.h:69
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.
定义 hitls_psk.h:56
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 during 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
定义 hitls_psk.h:82
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 and PSK during PSK ...
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 client durin...
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
定义 hitls_type.h:35
struct TlsConfig HITLS_Config
config context
定义 hitls_type.h:41