openHiTLS API openHiTLS 0.1.0-Alpha1
宏定义 | 类型定义 | 函数
hitls_security.h 文件参考
hitls_security.h 的引用(Include)关系图:

浏览源代码.

宏定义

#define HITLS_DEFAULT_SECURITY_LEVEL   0
 
#define HITLS_SECURITY_LEVEL_ZERO   0
 
#define HITLS_SECURITY_LEVEL_ONE   1
 
#define HITLS_SECURITY_LEVEL_TWO   2
 
#define HITLS_SECURITY_LEVEL_THREE   3
 
#define HITLS_SECURITY_LEVEL_FOUR   4
 
#define HITLS_SECURITY_LEVEL_FIVE   5
 
#define HITLS_SECURITY_LEVEL_MIN   HITLS_SECURITY_LEVEL_ZERO
 
#define HITLS_SECURITY_LEVEL_MAX   HITLS_SECURITY_LEVEL_FIVE
 
#define HITLS_SECURITY_LEVEL_ONE_SECBITS   80
 
#define HITLS_SECURITY_LEVEL_TWO_SECBITS   112
 
#define HITLS_SECURITY_LEVEL_THREE_SECBITS   128
 
#define HITLS_SECURITY_LEVEL_FOUR_SECBITS   192
 
#define HITLS_SECURITY_LEVEL_FIVE_SECBITS   256
 
#define HITLS_SECURITY_SECOP_OTHER_TYPE   0xffff0000
 
#define HITLS_SECURITY_SECOP_OTHER_NONE   0
 
#define HITLS_SECURITY_SECOP_OTHER_CIPHER   (1 << 16)
 
#define HITLS_SECURITY_SECOP_OTHER_CURVE   (2 << 16)
 
#define HITLS_SECURITY_SECOP_OTHER_DH   (3 << 16)
 
#define HITLS_SECURITY_SECOP_OTHER_PKEY   (4 << 16)
 
#define HITLS_SECURITY_SECOP_OTHER_SIGALG   (5 << 16)
 
#define HITLS_SECURITY_SECOP_OTHER_CERT   (6 << 16)
 
#define HITLS_SECURITY_SECOP_PEER   0x1000
 
#define HITLS_SECURITY_SECOP_CIPHER_SUPPORTED   (1 | HITLS_SECURITY_SECOP_OTHER_CIPHER)
 
#define HITLS_SECURITY_SECOP_CIPHER_SHARED   (2 | HITLS_SECURITY_SECOP_OTHER_CIPHER)
 
#define HITLS_SECURITY_SECOP_CIPHER_CHECK   (3 | HITLS_SECURITY_SECOP_OTHER_CIPHER)
 
#define HITLS_SECURITY_SECOP_CURVE_SUPPORTED   (4 | HITLS_SECURITY_SECOP_OTHER_CURVE)
 
#define HITLS_SECURITY_SECOP_CURVE_SHARED   (5 | HITLS_SECURITY_SECOP_OTHER_CURVE)
 
#define HITLS_SECURITY_SECOP_CURVE_CHECK   (6 | HITLS_SECURITY_SECOP_OTHER_CURVE)
 
#define HITLS_SECURITY_SECOP_TMP_DH   (7 | HITLS_SECURITY_SECOP_OTHER_PKEY)
 
#define HITLS_SECURITY_SECOP_VERSION   (9 | HITLS_SECURITY_SECOP_OTHER_NONE)
 
#define HITLS_SECURITY_SECOP_TICKET   (10 | HITLS_SECURITY_SECOP_OTHER_NONE)
 
#define HITLS_SECURITY_SECOP_SIGALG_SUPPORTED   (11 | HITLS_SECURITY_SECOP_OTHER_SIGALG)
 
#define HITLS_SECURITY_SECOP_SIGALG_SHARED   (12 | HITLS_SECURITY_SECOP_OTHER_SIGALG)
 
#define HITLS_SECURITY_SECOP_SIGALG_CHECK   (13 | HITLS_SECURITY_SECOP_OTHER_SIGALG)
 
#define HITLS_SECURITY_SECOP_SIGALG_MASK   (14 | HITLS_SECURITY_SECOP_OTHER_SIGALG)
 
#define HITLS_SECURITY_SECOP_COMPRESSION   (15 | HITLS_SECURITY_SECOP_OTHER_NONE)
 
#define HITLS_SECURITY_SECOP_EE_KEY   (16 | HITLS_SECURITY_SECOP_OTHER_CERT)
 
#define HITLS_SECURITY_SECOP_CA_KEY   (17 | HITLS_SECURITY_SECOP_OTHER_CERT)
 
#define HITLS_SECURITY_SECOP_CA_MD   (18 | HITLS_SECURITY_SECOP_OTHER_CERT)
 
#define HITLS_SECURITY_SECOP_PEER_EE_KEY   (HITLS_SECURITY_SECOP_EE_KEY | HITLS_SECURITY_SECOP_PEER)
 
#define HITLS_SECURITY_SECOP_PEER_CA_KEY   (HITLS_SECURITY_SECOP_CA_KEY | HITLS_SECURITY_SECOP_PEER)
 
#define HITLS_SECURITY_SECOP_PEER_CA_MD   (HITLS_SECURITY_SECOP_CA_MD | HITLS_SECURITY_SECOP_PEER)
 

类型定义

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.