openHiTLS API openHiTLS 0.1.0-Alpha1
宏定义 | 类型定义 | 函数
Hitls_psk

Basic functions for link establishment based on PSK 更多...

Hitls_psk 的协作图:

宏定义

#define HITLS_IDENTITY_HINT_MAX_SIZE   128
 PSK Maximum size of the identity message
 

类型定义

typedef 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.
 
typedef uint32_t(* HITLS_PskServerCb) (HITLS_Ctx *ctx, const uint8_t *identity, uint8_t *psk, uint32_t maxPskLen)
 Obtain the PSK prototype on the server.
 
typedef int32_t(* HITLS_PskFindSessionCb) (HITLS_Ctx *ctx, const uint8_t *identity, uint32_t identityLen, HITLS_Session **session)
 TLS1.3 server PSK negotiation callback
 
typedef 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
 

函数

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_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.
 
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_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_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_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_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.
 
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_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.
 

详细描述

Basic functions for link establishment based on PSK