TLS security features
更多...
|
|
#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
|
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()
Obtain the configured security callback function
- 参数
-
| config | [IN] Config context |
- 返回值
-
◆ 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()
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()
Obtain the Security callback function of the link
- 参数
-
- 返回值
-
◆ HITLS_GetSecurityExData()
| void * HITLS_GetSecurityExData |
( |
const HITLS_Ctx * | ctx | ) |
|
Obtains the configured Security ExData.
- 参数
-
- 返回
- 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()
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