API参考
载入中...
搜索中...
未找到
Hitls_security

TLS security features 更多...

Hitls_security 的协作图:

宏定义

#define HITLS_DEFAULT_SECURITY_LEVEL   1
 HiTLS default level of security. HiTLS default level of security. You can configure the default level by using the compilation macro. If the compilation macro is not defined, the default level 1 is used.
#define HITLS_SECURITY_LEVEL_ZERO   0
 Security level
#define HITLS_SECURITY_LEVEL_ONE_SECBITS   80
 Security strength
#define HITLS_SECURITY_SECOP_PEER   0x1000
 Indicated operation refers to peer key or certificate

类型定义

typedef int32_t(* HITLS_SecurityCb) (const HITLS_Ctx *ctx, const HITLS_Config *config, int32_t option, int32_t bits, int32_t id, void *other, void *exData)
 Secure Callback Function Prototype

函数

int32_t HITLS_CFG_SetSecurityLevel (HITLS_Config *config, int32_t securityLevel)
 Configure the security level
int32_t HITLS_CFG_GetSecurityLevel (const HITLS_Config *config, int32_t *securityLevel)
 Obtain the configured security level.
int32_t HITLS_CFG_SetSecurityCb (HITLS_Config *config, HITLS_SecurityCb securityCb)
 Configure the security callback function.
HITLS_SecurityCb HITLS_CFG_GetSecurityCb (const HITLS_Config *config)
 Obtain the configured security callback function
int32_t HITLS_CFG_SetSecurityExData (HITLS_Config *config, void *securityExData)
 Configuring the Security ExData
void * HITLS_CFG_GetSecurityExData (const HITLS_Config *config)
 Obtain the configured Security ExData
int32_t HITLS_SetSecurityLevel (HITLS_Ctx *ctx, int32_t securityLevel)
 Set the link security level
int32_t HITLS_GetSecurityLevel (const HITLS_Ctx *ctx, int32_t *securityLevel)
 Obtain the link security level
int32_t HITLS_SetSecurityCb (HITLS_Ctx *ctx, HITLS_SecurityCb securityCb)
 Callback function for setting link security
HITLS_SecurityCb HITLS_GetSecurityCb (const HITLS_Ctx *ctx)
 Obtain the Security callback function of the link
int32_t HITLS_SetSecurityExData (HITLS_Ctx *ctx, void *securityExData)
 Setting Security ExData for the Link
void * HITLS_GetSecurityExData (const HITLS_Ctx *ctx)
 Obtains the configured Security ExData.

详细描述

TLS security features

类型定义说明

◆ HITLS_SecurityCb

typedef int32_t(* HITLS_SecurityCb) (const HITLS_Ctx *ctx, const HITLS_Config *config, int32_t option, int32_t bits, int32_t id, void *other, void *exData)

Secure Callback Function Prototype

参数
ctx[IN] context
config[IN] context
option[IN] indicates the options to be checked, such as the version, certificate, temporary key, signature algorithm, support group, and session ticket...
bits[IN] Number of security bits, which is used to check the level of security of the key.
id[IN] Indicates the ID to be checked, such as the version ID, signature algorithm ID, and support group ID. Input based on the options that need to be checked.
other[IN] Parameters to be checked, such as cipher suites, certificates, and signature algorithms.
exData[IN] Input the data as required.
返回
1: success; others: failure

函数说明

◆ HITLS_CFG_GetSecurityCb()

HITLS_SecurityCb HITLS_CFG_GetSecurityCb ( const HITLS_Config * config)

Obtain the configured security callback function

参数
config[IN] Config context
返回值
Securitycallback function HITLS_SecurityCb.

◆ HITLS_CFG_GetSecurityExData()

void * HITLS_CFG_GetSecurityExData ( const HITLS_Config * config)

Obtain the configured Security ExData

参数
config[IN] Config context
返回
Security ExData

◆ HITLS_CFG_GetSecurityLevel()

int32_t HITLS_CFG_GetSecurityLevel ( const HITLS_Config * config,
int32_t * securityLevel )

Obtain the configured security level.

参数
config[IN] Config context
securityLevel[OUT] Security Context
返回
HITLS_SUCCESS, if successful. For details about other error codes, see hitls_error.h

◆ HITLS_CFG_SetSecurityCb()

int32_t HITLS_CFG_SetSecurityCb ( HITLS_Config * config,
HITLS_SecurityCb securityCb )

Configure the security callback function.

参数
config[IN/OUT] Config context
securityCb[IN] Security callback function
返回
HITLS_SUCCESS, if successful. For details about other error codes, see hitls_error.h.

◆ HITLS_CFG_SetSecurityExData()

int32_t HITLS_CFG_SetSecurityExData ( HITLS_Config * config,
void * securityExData )

Configuring the Security ExData

参数
config[IN/OUT] Config context
securityExData[IN] Security ExData
返回
HITLS_SUCCESS, if successful. For details about other error codes, see hitls_error.h

◆ HITLS_CFG_SetSecurityLevel()

int32_t HITLS_CFG_SetSecurityLevel ( HITLS_Config * config,
int32_t securityLevel )

Configure the security level

参数
config[IN/OUT] Config context
securityLevel[IN] Security level
返回
HITLS_SUCCESS, if successful. For details about other error codes, see hitls_error.h

◆ HITLS_GetSecurityCb()

HITLS_SecurityCb HITLS_GetSecurityCb ( const HITLS_Ctx * ctx)

Obtain the Security callback function of the link

参数
ctx[IN] Ctx context
返回值
Securitycallback HITLS_SecurityCb.

◆ HITLS_GetSecurityExData()

void * HITLS_GetSecurityExData ( const HITLS_Ctx * ctx)

Obtains the configured Security ExData.

参数
ctx[IN] Ctx context
返回
Security ExData

◆ HITLS_GetSecurityLevel()

int32_t HITLS_GetSecurityLevel ( const HITLS_Ctx * ctx,
int32_t * securityLevel )

Obtain the link security level

参数
ctx[IN] Ctx context
securityLevel[OUT] Security level
返回
HITLS_SUCCESS, if successful. For details about other error codes, see hitls_error.h

◆ HITLS_SetSecurityCb()

int32_t HITLS_SetSecurityCb ( HITLS_Ctx * ctx,
HITLS_SecurityCb securityCb )

Callback function for setting link security

参数
ctx[IN/OUT] Ctx context
securityCb[IN] Security callback function
返回
HITLS_SUCCESS, if successful. For details about other error codes, see hitls_error.h

◆ HITLS_SetSecurityExData()

int32_t HITLS_SetSecurityExData ( HITLS_Ctx * ctx,
void * securityExData )

Setting Security ExData for the Link

参数
ctx[IN/OUT] Ctx context
securityExData[IN] Security ExData
返回
HITLS_SUCCESS, if successful. For details about other error codes, hitls_error.h

◆ HITLS_SetSecurityLevel()

int32_t HITLS_SetSecurityLevel ( HITLS_Ctx * ctx,
int32_t securityLevel )

Set the link security level

参数
ctx[IN/OUT] Ctx context
securityLevel[IN] Security level
返回
HITLS_SUCCESS, if successful. For details about other error codes, see hitls_error.h