![]() |
API参考
|
TLS parameter configuration 更多...

类型定义 | |
| typedef int32_t(* | HITLS_ClientHelloCb) (HITLS_Ctx *ctx, int32_t *alert, void *arg) |
| ClientHello callback prototype for the server to process the callback. | |
| typedef uint32_t(* | HITLS_DtlsTimerCb) (HITLS_Ctx *ctx, uint32_t us) |
| DTLS callback prototype for obtaining the timeout interval | |
| typedef void(* | HITLS_ConfigUserDataFreeCb) (void *) |
| UserData free callback | |
| typedef HITLS_CRYPT_Key *(* | HITLS_DhTmpCb) (HITLS_Ctx *ctx, int32_t isExport, uint32_t keyLen) |
| Generate temporary DH key. | |
| typedef uint64_t(* | HITLS_RecordPaddingCb) (HITLS_Ctx *ctx, int32_t type, uint64_t length, void *arg) |
| Callback function for handling TLS record padding. | |
枚举 | |
| enum | HITLS_CipherSuite { HITLS_RSA_WITH_AES_128_CBC_SHA = 0x002F , HITLS_DHE_DSS_WITH_AES_128_CBC_SHA = 0x0032 , HITLS_DHE_RSA_WITH_AES_128_CBC_SHA = 0x0033 , HITLS_DH_ANON_WITH_AES_128_CBC_SHA = 0x0034 , HITLS_RSA_WITH_AES_256_CBC_SHA = 0x0035 , HITLS_DHE_DSS_WITH_AES_256_CBC_SHA = 0x0038 , HITLS_DHE_RSA_WITH_AES_256_CBC_SHA = 0x0039 , HITLS_DH_ANON_WITH_AES_256_CBC_SHA = 0x003A , HITLS_RSA_WITH_AES_128_CBC_SHA256 = 0x003C , HITLS_RSA_WITH_AES_256_CBC_SHA256 = 0x003D , HITLS_DHE_DSS_WITH_AES_128_CBC_SHA256 = 0x0040 , HITLS_DHE_RSA_WITH_AES_128_CBC_SHA256 = 0x0067 , HITLS_DHE_DSS_WITH_AES_256_CBC_SHA256 = 0x006A , HITLS_DHE_RSA_WITH_AES_256_CBC_SHA256 = 0x006B , HITLS_DH_ANON_WITH_AES_128_CBC_SHA256 = 0x006C , HITLS_DH_ANON_WITH_AES_256_CBC_SHA256 = 0x006D , HITLS_PSK_WITH_AES_128_CBC_SHA = 0x008C , HITLS_PSK_WITH_AES_256_CBC_SHA = 0x008D , HITLS_DHE_PSK_WITH_AES_128_CBC_SHA = 0x0090 , HITLS_DHE_PSK_WITH_AES_256_CBC_SHA = 0x0091 , HITLS_RSA_PSK_WITH_AES_128_CBC_SHA = 0x0094 , HITLS_RSA_PSK_WITH_AES_256_CBC_SHA = 0x0095 , HITLS_RSA_WITH_AES_128_GCM_SHA256 = 0x009C , HITLS_RSA_WITH_AES_256_GCM_SHA384 = 0x009D , HITLS_DHE_RSA_WITH_AES_128_GCM_SHA256 = 0x009E , HITLS_DHE_RSA_WITH_AES_256_GCM_SHA384 = 0x009F , HITLS_DHE_DSS_WITH_AES_128_GCM_SHA256 = 0x00A2 , HITLS_DHE_DSS_WITH_AES_256_GCM_SHA384 = 0x00A3 , HITLS_DH_ANON_WITH_AES_128_GCM_SHA256 = 0x00A6 , HITLS_DH_ANON_WITH_AES_256_GCM_SHA384 = 0x00A7 , HITLS_PSK_WITH_AES_128_GCM_SHA256 = 0x00A8 , HITLS_PSK_WITH_AES_256_GCM_SHA384 = 0x00A9 , HITLS_DHE_PSK_WITH_AES_128_GCM_SHA256 = 0x00AA , HITLS_DHE_PSK_WITH_AES_256_GCM_SHA384 = 0x00AB , HITLS_RSA_PSK_WITH_AES_128_GCM_SHA256 = 0x00AC , HITLS_RSA_PSK_WITH_AES_256_GCM_SHA384 = 0x00AD , HITLS_PSK_WITH_AES_128_CBC_SHA256 = 0x00AE , HITLS_PSK_WITH_AES_256_CBC_SHA384 = 0x00AF , HITLS_DHE_PSK_WITH_AES_128_CBC_SHA256 = 0x00B2 , HITLS_DHE_PSK_WITH_AES_256_CBC_SHA384 = 0x00B3 , HITLS_RSA_PSK_WITH_AES_128_CBC_SHA256 = 0x00B6 , HITLS_RSA_PSK_WITH_AES_256_CBC_SHA384 = 0x00B7 , HITLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA = 0xC009 , HITLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA = 0xC00A , HITLS_ECDHE_RSA_WITH_AES_128_CBC_SHA = 0xC013 , HITLS_ECDHE_RSA_WITH_AES_256_CBC_SHA = 0xC014 , HITLS_ECDH_ANON_WITH_AES_128_CBC_SHA = 0xC018 , HITLS_ECDH_ANON_WITH_AES_256_CBC_SHA = 0xC019 , HITLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 = 0xC023 , HITLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 = 0xC024 , HITLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 = 0xC027 , HITLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 = 0xC028 , HITLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = 0xC02B , HITLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = 0xC02C , HITLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 = 0xC02F , HITLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 = 0xC030 , HITLS_ECDHE_PSK_WITH_AES_128_CBC_SHA = 0xC035 , HITLS_ECDHE_PSK_WITH_AES_256_CBC_SHA = 0xC036 , HITLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256 = 0xC037 , HITLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384 = 0xC038 , HITLS_RSA_WITH_AES_128_CCM = 0xC09C , HITLS_RSA_WITH_AES_256_CCM = 0xC09D , HITLS_DHE_RSA_WITH_AES_128_CCM = 0xC09E , HITLS_DHE_RSA_WITH_AES_256_CCM = 0xC09F , HITLS_RSA_WITH_AES_128_CCM_8 = 0xC0A0 , HITLS_RSA_WITH_AES_256_CCM_8 = 0xC0A1 , HITLS_PSK_WITH_AES_256_CCM = 0xC0A5 , HITLS_DHE_PSK_WITH_AES_128_CCM = 0xC0A6 , HITLS_DHE_PSK_WITH_AES_256_CCM = 0xC0A7 , HITLS_ECDHE_ECDSA_WITH_AES_128_CCM = 0xC0AC , HITLS_ECDHE_ECDSA_WITH_AES_256_CCM = 0xC0AD , HITLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 = 0xCCA8 , HITLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 = 0xCCA9 , HITLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256 = 0xCCAA , HITLS_PSK_WITH_CHACHA20_POLY1305_SHA256 = 0xCCAB , HITLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256 = 0xCCAC , HITLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256 = 0xCCAD , HITLS_RSA_PSK_WITH_CHACHA20_POLY1305_SHA256 = 0xCCAE , HITLS_ECDHE_PSK_WITH_AES_128_GCM_SHA256 = 0xD001 , HITLS_ECDHE_PSK_WITH_AES_256_GCM_SHA384 = 0xD002 , HITLS_ECDHE_PSK_WITH_AES_128_CCM_SHA256 = 0xD005 , HITLS_AES_128_GCM_SHA256 = 0x1301 , HITLS_AES_256_GCM_SHA384 = 0x1302 , HITLS_CHACHA20_POLY1305_SHA256 = 0x1303 , HITLS_AES_128_CCM_SHA256 = 0x1304 , HITLS_AES_128_CCM_8_SHA256 = 0x1305 , HITLS_SM4_GCM_SM3 = 0x00C6 , HITLS_SM4_CCM_SM3 = 0x00C7 , HITLS_ECDHE_SM4_CBC_SM3 = 0xE011 , HITLS_ECC_SM4_CBC_SM3 = 0xE013 , HITLS_ECDHE_SM4_GCM_SM3 = 0xE051 , HITLS_ECC_SM4_GCM_SM3 = 0xE053 } |
| enumerate ciphersuites supported by HITLS with IANA coding | |
函数 | |
| HITLS_Config * | HITLS_CFG_NewDTLS12Config (void) |
| Create DTLS12 configuration items, including the default settings. The user can call the HITLS_CFG_SetXXX interface to modify the settings. | |
| HITLS_Config * | HITLS_CFG_ProviderNewDTLS12Config (HITLS_Lib_Ctx *libCtx, const char *attrName) |
| Create DTLS12 configuration items with provider, including the default settings. Same as HITLS_CFG_NewDTLS12Config except that it requires libCtx and attribute parameters. | |
| HITLS_Config * | HITLS_CFG_NewTLCPConfig (void) |
| Create TLCP configuration items, including default settings. The user can call the HITLS_CFG_SetXXX interface to modify the settings. | |
| HITLS_Config * | HITLS_CFG_ProviderNewTLCPConfig (HITLS_Lib_Ctx *libCtx, const char *attrName) |
| Create TLCP configuration items with provider, including the default settings. Same as HITLS_CFG_NewTLCPConfig except that it requires libCtx and attribute parameters. | |
| HITLS_Config * | HITLS_CFG_NewDTLCPConfig (void) |
| Create DTLCP configuration items, including the default settings. The user can call the HITLS_CFG_SetXXX interface to modify the settings. | |
| HITLS_Config * | HITLS_CFG_ProviderNewDTLCPConfig (HITLS_Lib_Ctx *libCtx, const char *attrName) |
| Create DTLCP configuration items with provider, including the default settings. Same as HITLS_CFG_NewDTLCPConfig except that it requires libCtx and attribute parameters. | |
| HITLS_Config * | HITLS_CFG_NewTLS12Config (void) |
| Create a TLS12 configuration item, including the default configuration. The user can call the HITLS_CFG_SetXXX interface to modify the configuration. | |
| HITLS_Config * | HITLS_CFG_ProviderNewTLS12Config (HITLS_Lib_Ctx *libCtx, const char *attrName) |
| Create TLS12 configuration items with provider, including the default settings. Same as HITLS_CFG_NewTLS12Config, except that it requires libCtx and attribute parameters. | |
| HITLS_Config * | HITLS_CFG_NewTLS13Config (void) |
| Creates the default TLS13 configuration. The HITLS_CFG_SetXXX interface can be used to modify the default TLS13 configuration. | |
| HITLS_Config * | HITLS_CFG_ProviderNewTLS13Config (HITLS_Lib_Ctx *libCtx, const char *attrName) |
| Create TLS13 configuration items with provider, including the default settings. Same as HITLS_CFG_NewTLS13Config, except that it requires libCtx and attribute parameters. | |
| HITLS_Config * | HITLS_CFG_NewTLSConfig (void) |
| Create full TLS configurations. The HITLS_CFG_SetXXX interface can be used to modify the configurations. | |
| HITLS_Config * | HITLS_CFG_ProviderNewTLSConfig (HITLS_Lib_Ctx *libCtx, const char *attrName) |
| Create TLS configuration items with provider, including the default settings. Same as HITLS_CFG_NewTLSConfig except that it requires libCtx and attribute parameters. | |
| HITLS_Config * | HITLS_CFG_NewDTLSConfig (void) |
| Create full DTLS configurations. The HITLS_CFG_SetXXX interface can be called to modify the DTLS configuration. | |
| HITLS_Config * | HITLS_CFG_ProviderNewDTLSConfig (HITLS_Lib_Ctx *libCtx, const char *attrName) |
| Create DTLS configuration items with provider, including the default settings. Same as HITLS_CFG_NewDTLSConfig, except that it requires libCtx and attribute parameters. | |
| void | HITLS_CFG_FreeConfig (HITLS_Config *config) |
| Release the config file. | |
| int32_t | HITLS_CFG_UpRef (HITLS_Config *config) |
| The reference counter of config increases by 1. | |
| int32_t | HITLS_CFG_SetVersion (HITLS_Config *config, uint16_t minVersion, uint16_t maxVersion) |
| Set the supported version number range. | |
| int32_t | HITLS_CFG_SetVersionForbid (HITLS_Config *config, uint32_t noVersion) |
| Setting the disabled version number. | |
| int32_t | HITLS_CFG_SetRenegotiationSupport (HITLS_Config *config, bool support) |
| Set whether to support renegotiation. | |
| int32_t | HITLS_CFG_SetClientRenegotiateSupport (HITLS_Config *config, bool support) |
| Set whether to allow a renegotiate request from the client | |
| int32_t | HITLS_CFG_SetLegacyRenegotiateSupport (HITLS_Config *config, bool support) |
| Set whether to abort handshake when server doesn't support SecRenegotiation | |
| int32_t | HITLS_CFG_SetResumptionOnRenegoSupport (HITLS_Config *config, bool support) |
| Set whether to support session restoration during renegotiation. By default, session restoration is not supported. | |
| int32_t | HITLS_CFG_SetClientVerifySupport (HITLS_Config *config, bool support) |
| Sets whether to verify the client certificate. Client: This setting has no impact Server: The certificate request will be sent. | |
| int32_t | HITLS_CFG_SetNoClientCertSupport (HITLS_Config *config, bool support) |
| Sets whether to allow the client certificate to be empty. This parameter takes effect only when client certificate verification is enabled. Client: This setting has no impact Server: Check whether the certificate passes the verification when receiving an empty certificate from the client. The verification fails by default. | |
| int32_t | HITLS_CFG_SetExtendedMasterSecretSupport (HITLS_Config *config, bool support) |
| Sets whether to forcibly support extended master keys. | |
| int32_t | HITLS_CFG_SetDhAutoSupport (HITLS_Config *config, bool support) |
| Set whether the DH parameter can be automatically selected by users. If the value is true, the DH parameter is automatically selected based on the length of the certificate private key. If the value is false, the DH parameter needs to be set. | |
| int32_t | HITLS_CFG_SetTmpDh (HITLS_Config *config, HITLS_CRYPT_Key *dhPkey) |
| Set the DH parameter specified by the user. | |
| int32_t | HITLS_CFG_GetRenegotiationSupport (const HITLS_Config *config, bool *isSupport) |
| Query whether renegotiation is supported. | |
| int32_t | HITLS_CFG_GetClientVerifySupport (HITLS_Config *config, bool *isSupport) |
| Query whether the client certificate can be verified. | |
| int32_t | HITLS_CFG_GetNoClientCertSupport (HITLS_Config *config, bool *isSupport) |
| Query whether support there is no client certificate. This parameter takes effect only when the client certificate is verified. | |
| int32_t | HITLS_CFG_GetExtendedMasterSecretSupport (HITLS_Config *config, bool *isSupport) |
| Query whether extended master keys are supported. | |
| int32_t | HITLS_CFG_SetExtendedMasterSecretMode (HITLS_Config *config, int32_t mode) |
| Set extended master secret mode. | |
| int32_t | HITLS_CFG_GetExtendedMasterSecretMode (HITLS_Config *config, int32_t *mode) |
| Get extended master secret mode. | |
| int32_t | HITLS_CFG_GetDhAutoSupport (HITLS_Config *config, bool *isSupport) |
| Query whether the DH parameter can be automatically selected by the user. If yes, the DH parameter will be automatically selected based on the length of the certificate private key. | |
| int32_t | HITLS_CFG_SetPostHandshakeAuthSupport (HITLS_Config *config, bool support) |
| Setting whether to support post-handshake auth takes effect only for TLS1.3. client: If the client supports pha, the client sends pha extensions. Server: supports pha. After the handshake, the upper-layer interface HITLS_VerifyClientPostHandshake initiates certificate verification. | |
| int32_t | HITLS_CFG_GetPostHandshakeAuthSupport (HITLS_Config *config, bool *isSupport) |
| Query whether the post-handshake AUTH function is supported. | |
| int32_t | HITLS_CFG_SetVerifyNoneSupport (HITLS_Config *config, bool support) |
| Sets whether to support not perform dual-ended verification | |
| int32_t | HITLS_CFG_GetVerifyNoneSupport (HITLS_Config *config, bool *isSupport) |
| Query whether not perform dual-ended verification is supported | |
| int32_t | HITLS_CFG_SetClientOnceVerifySupport (HITLS_Config *config, bool support) |
| Set whether request client certificate only once is supported | |
| int32_t | HITLS_CFG_GetClientOnceVerifySupport (HITLS_Config *config, bool *isSupport) |
| Query whether request client certificate only once is supported | |
| int32_t | HITLS_CFG_SetCipherSuites (HITLS_Config *config, const uint16_t *cipherSuites, uint32_t cipherSuitesSize) |
| Set the supported cipher suites. The sequence of the cipher suites affects the priority of the selected cipher suites. The cipher suite with the highest priority is the first. | |
| int32_t | HITLS_CFG_GetCipherSuites (HITLS_Config *config, uint16_t *data, uint32_t dataLen, uint32_t *cipherSuitesSize) |
| Get the supported cipher suites array. | |
| int32_t | HITLS_CFG_ClearTLS13CipherSuites (HITLS_Config *config) |
| Clear the TLS1.3 cipher suite. | |
| int32_t | HITLS_CFG_SetEcPointFormats (HITLS_Config *config, const uint8_t *pointFormats, uint32_t pointFormatsSize) |
| Set the format of the ec point. | |
| int32_t | HITLS_CFG_SetGroups (HITLS_Config *config, const uint16_t *groups, uint32_t groupsSize) |
| Set the group supported during key exchange. The group supported by HiTLS can be queried in HITLS_NamedGroup. | |
| int32_t | HITLS_CFG_SetGroupList (HITLS_Config *config, const char *groupNames, uint32_t groupNamesLen) |
| Set the group supported during key exchange. The group supported by HiTLS can be queried in HITLS_NamedGroup. | |
| int32_t | HITLS_CFG_SetSignature (HITLS_Config *config, const uint16_t *signAlgs, uint16_t signAlgsSize) |
| Set the signature algorithms supported during negotiation. The signature algorithms supported by the HiTLS can be queried in the HITLS_SignHashAlgo file. | |
| int32_t | HITLS_CFG_AddCAIndication (HITLS_Config *config, HITLS_TrustedCAType caType, const uint8_t *data, uint32_t len) |
| Add the CA indicator, which is used when the peer certificate is requested. | |
| HITLS_TrustedCAList * | HITLS_CFG_GetCAList (const HITLS_Config *config) |
| Obtain the CA list. | |
| int32_t | HITLS_CFG_SetCAList (HITLS_Config *config, HITLS_TrustedCAList *list) |
| Set the CA list. | |
| void | HITLS_CFG_ClearCAList (HITLS_Config *config) |
| Clear the CA list. | |
| int32_t | HITLS_CFG_SetKeyExchMode (HITLS_Config *config, uint32_t mode) |
| Set the key exchange mode, which is used by TLS1.3. | |
| uint32_t | HITLS_CFG_GetKeyExchMode (HITLS_Config *config) |
| Obtain the key exchange mode, which is used by TLS1.3. | |
| int32_t | HITLS_CFG_SetClientHelloCb (HITLS_Config *config, HITLS_ClientHelloCb callback, void *arg) |
| Set the cookie verification callback on the server. | |
| int32_t | HITLS_CFG_SetDtlsTimerCb (HITLS_Config *config, HITLS_DtlsTimerCb callback) |
| Set the DTLS obtaining timeout interval callback. | |
| int32_t | HITLS_CFG_GetMinVersion (const HITLS_Config *config, uint16_t *minVersion) |
| Obtaining the Minimum Supported Version Number | |
| int32_t | HITLS_CFG_GetMaxVersion (const HITLS_Config *config, uint16_t *maxVersion) |
| Obtaining the Maximum supported version number | |
| int32_t | HITLS_CFG_GetCipherId (const HITLS_Cipher *cipher, HITLS_CipherAlgo *cipherAlg) |
| Obtain the symmetric encryption algorithm type based on the cipher suite. | |
| int32_t | HITLS_CFG_GetHashId (const HITLS_Cipher *cipher, HITLS_HashAlgo *hashAlg) |
| Obtain the hash algorithm type based on the cipher suite. | |
| int32_t | HITLS_CFG_GetMacId (const HITLS_Cipher *cipher, HITLS_MacAlgo *macAlg) |
| Obtain the MAC algorithm type based on the cipher suite. | |
| int32_t | HITLS_CFG_GetAuthId (const HITLS_Cipher *cipher, HITLS_AuthAlgo *authAlg) |
| Obtain the server authorization algorithm type based on the cipher suite. | |
| int32_t | HITLS_CFG_GetKeyExchId (const HITLS_Cipher *cipher, HITLS_KeyExchAlgo *kxAlg) |
| Obtain the key exchange algorithm type based on the cipher suite. | |
| const uint8_t * | HITLS_CFG_GetCipherSuiteName (const HITLS_Cipher *cipher) |
| Obtain the cipher suite name based on the cipher suite. | |
| const uint8_t * | HITLS_CFG_GetCipherSuiteStdName (const HITLS_Cipher *cipher) |
| Obtain the RFC standard name of the cipher suite based on the cipher suite. | |
| const HITLS_Cipher * | HITLS_CFG_GetCipherSuiteByStdName (const uint8_t *stdName) |
| Obtain the corresponding cipher suite pointer based on the RFC Standard Name. | |
| int32_t | HITLS_CFG_GetDescription (const HITLS_Cipher *cipher, uint8_t *buf, int32_t len) |
| Outputs the description of the cipher suite as a string. | |
| int32_t | HITLS_CIPHER_IsAead (const HITLS_Cipher *cipher, bool *isAead) |
| Determine whether to use the AEAD algorithm based on the cipher suite information. | |
| int32_t | HITLS_CFG_GetCipherVersion (const HITLS_Cipher *cipher, int32_t *version) |
| Obtain the earliest TLS version supported by the cipher suite based on the cipher suite. | |
| const HITLS_Cipher * | HITLS_CFG_GetCipherByID (uint16_t cipherSuite) |
| Obtain the cipher suite pointer based on the cipher suite ID. | |
| int32_t | HITLS_CFG_GetCipherSuite (const HITLS_Cipher *cipher, uint16_t *cipherSuite) |
| Obtain the encryption ID in the cipher suite. | |
| int32_t | HITLS_CFG_GetVersionSupport (const HITLS_Config *config, uint32_t *version) |
| Obtain the supported version number. | |
| int32_t | HITLS_CFG_SetVersionSupport (HITLS_Config *config, uint32_t version) |
| Set the supported version number. | |
| int32_t | HITLS_CFG_SetNeedCheckPmsVersion (HITLS_Config *config, bool needCheck) |
| This interface is used to verify the version in the premaster secret. This interface takes effect on the server. The version must be earlier than 1.0, including 1.0. | |
| int32_t | HITLS_CFG_SetModeSupport (HITLS_Config *config, uint32_t mode) |
| Set the function to support the specified feature. | |
| int32_t | HITLS_CFG_ClearModeSupport (HITLS_Config *config, uint32_t mode) |
| Disable the specified feature. | |
| int32_t | HITLS_CFG_GetModeSupport (const HITLS_Config *config, uint32_t *mode) |
| Obtain the mode of the function feature in the config file. | |
| int32_t | HITLS_CFG_SetQuietShutdown (HITLS_Config *config, int32_t mode) |
| Set the quiet disconnection mode. | |
| int32_t | HITLS_CFG_GetQuietShutdown (const HITLS_Config *config, int32_t *mode) |
| Obtain the current quiet disconnection mode. | |
| int32_t | HITLS_CFG_SetDtlsPostHsTimeoutVal (HITLS_Config *config, uint32_t timeoutVal) |
| Set the timeout period after the DTLS over UDP connection is complete. If the timer expires, the system does not receive the finished message resent by the peer end. If this parameter is set to 0, the default value 240 seconds is used. | |
| int32_t | HITLS_CFG_SetEncryptThenMac (HITLS_Config *config, bool encryptThenMacType) |
| Set the Encrypt-Then-Mac mode. | |
| int32_t | HITLS_CFG_GetEncryptThenMac (const HITLS_Config *config, bool *encryptThenMacType) |
| Obtain the Encrypt-Then-Mac type. | |
| void * | HITLS_CFG_GetConfigUserData (const HITLS_Config *config) |
| Obtain the user data from the HiTLS Config object. Generally, this function is called during the callback registered with the HiTLS. | |
| int32_t | HITLS_CFG_SetConfigUserData (HITLS_Config *config, void *userData) |
| User data is stored in the HiTLS Config. The user data can be obtained from the callback registered with the HiTLS. | |
| int32_t | HITLS_CFG_SetConfigUserDataFreeCb (HITLS_Config *config, HITLS_ConfigUserDataFreeCb callback) |
| Sets the UserData free callback | |
| int32_t | HITLS_CFG_IsDtls (const HITLS_Config *config, bool *isDtls) |
| Determine whether to use DTLS. | |
| int32_t | HITLS_CFG_SetCipherServerPreference (HITLS_Config *config, bool isSupport) |
| cipher suites are preferentially selected from the list of algorithms supported by the server. | |
| int32_t | HITLS_CFG_GetCipherServerPreference (const HITLS_Config *config, bool *isSupport) |
| Obtains whether the current cipher suite supports preferential selection from the list of algorithms supported by the server. | |
| int32_t | HITLS_CFG_SetFlightTransmitSwitch (HITLS_Config *config, bool isEnable) |
| Set whether to send handshake messages by route. DTLS over SCTP does not support this ability. | |
| int32_t | HITLS_CFG_GetFlightTransmitSwitch (const HITLS_Config *config, bool *isEnable) |
| Obtains the status of whether to send handshake information according to the route. | |
| int32_t | HITLS_CFG_SetDtlsCookieExchangeSupport (HITLS_Config *config, bool isSupport) |
| Set whether the DTLS performs cookie exchange. | |
| int32_t | HITLS_CFG_GetDtlsCookieExchangeSupport (const HITLS_Config *config, bool *isSupport) |
| Return whether the DTLS performs cookie exchange. | |
| int32_t | HITLS_CFG_SetEmptyRecordsNum (HITLS_Config *config, uint32_t emptyNum) |
| Set the max empty records number can be received | |
| int32_t | HITLS_CFG_GetEmptyRecordsNum (const HITLS_Config *config, uint32_t *emptyNum) |
| Obtain the max empty records number can be received | |
| int32_t | HITLS_CFG_SetMaxSendFragment (HITLS_Config *config, uint16_t maxSendFragment) |
| Set the max send fragment to restrict the amount of plaintext bytes in any record | |
| int32_t | HITLS_CFG_GetMaxSendFragment (const HITLS_Config *config, uint16_t *maxSendFragment) |
| Obtain the max send fragment to restrict the amount of plaintext bytes in any record | |
| int32_t | HITLS_CFG_SetRecInbufferSize (HITLS_Config *config, uint32_t recInbufferSize) |
| Set the rec inbuffer inital size | |
| int32_t | HITLS_CFG_GetRecInbufferSize (const HITLS_Config *config, uint32_t *recInbufferSize) |
| Obtain the rec inbuffer inital size | |
| int32_t | HITLS_CFG_SetMaxCertList (HITLS_Config *config, uint32_t maxSize) |
| Set the maximum size of the certificate chain that can be sent by the peer end. | |
| int32_t | HITLS_CFG_GetMaxCertList (const HITLS_Config *config, uint32_t *maxSize) |
| Obtain the maximum size of the certificate chain that can be sent by the peer end. | |
| int32_t | HITLS_CFG_SetTmpDhCb (HITLS_Config *config, HITLS_DhTmpCb callback) |
| Set the TmpDh callback, cb can be NULL. | |
| int32_t | HITLS_CFG_SetRecordPaddingCb (HITLS_Config *config, HITLS_RecordPaddingCb callback) |
| Set the RecordPadding callback. | |
| HITLS_RecordPaddingCb | HITLS_CFG_GetRecordPaddingCb (HITLS_Config *config) |
| Obtains the RecordPadding callback function. | |
| int32_t | HITLS_CFG_SetRecordPaddingCbArg (HITLS_Config *config, void *arg) |
| Sets the parameters arg required by the RecordPadding callback function. | |
| void * | HITLS_CFG_GetRecordPaddingCbArg (HITLS_Config *config) |
| Obtains the parameter arg required by the RecordPadding callback function. | |
| int32_t | HITLS_CFG_SetCheckKeyUsage (HITLS_Config *config, bool isCheck) |
| Disables the verification of keyusage in the certificate. This function is enabled by default. | |
| int32_t | HITLS_CFG_SetReadAhead (HITLS_Config *config, int32_t onOff) |
| Set read ahead flag to indicate whether read more data than user required to buffer in advance | |
| int32_t | HITLS_CFG_GetReadAhead (HITLS_Config *config, int32_t *onOff) |
| Get whether reading ahead has been set or not | |
| int32_t | HITLS_CFG_SetKeepPeerCertificate (HITLS_Config *config, bool isKeepPeerCert) |
| Set whether to save the peer certificate. | |
| int32_t | HITLS_CFG_SetRecordSizeLimit (HITLS_Config *config, uint16_t recordSize) |
| The default record size limit is 0 to unsupport the record size limit extension (RFC 8449). If negotiated, it is used only to limit the size of records sent by the peer in the receive direction. However, the record size sent to the peer is limited by the record size limit value of the peer. | |
| int32_t | HITLS_CFG_GetRecordSizeLimit (HITLS_Config *config, uint16_t *recordSize) |
| Obtains the record size limit value of ctx. | |
| int32_t | HITLS_CFG_SetEndPoint (HITLS_Config *config, bool isClient) |
| Set whether the current configuration is a client configuration. | |
| int32_t | HITLS_CFG_GetResumptionOnRenegoSupport (HITLS_Config *config, bool *isSupport) |
| Get whether to support session restoration during renegotiation. By default, session restoration is not supported. | |
| int32_t | HITLS_CFG_GetClientRenegotiateSupport (HITLS_Config *config, bool *isSupport) |
| Get whether to allow a renegotiate request from the client | |
| int32_t | HITLS_CFG_EnableTls13SM (HITLS_Config *config, bool isOnlySupportSM) |
| Set enable support tls1.3 SM | |
TLS parameter configuration
| typedef int32_t(* HITLS_ClientHelloCb) (HITLS_Ctx *ctx, int32_t *alert, void *arg) |
ClientHello callback prototype for the server to process the callback.
| ctx | [IN] Ctx context |
| alert | [OUT] The callback that returns a failure should indicate the alert value to be sent in al. |
| arg | [IN] Product input context |
| HITLS_CLIENT_HELLO_SUCCESS | successful. |
| HITLS_CLIENT_HELLO_RETRY | suspend the handshake process |
| HITLS_CLIENT_HELLO_FAILED | failed, send an alert message and terminate the handshake |
| typedef void(* HITLS_ConfigUserDataFreeCb) (void *) |
UserData free callback
| userData | [IN] Pointer to user data to be freed. |
| typedef HITLS_CRYPT_Key *(* HITLS_DhTmpCb) (HITLS_Ctx *ctx, int32_t isExport, uint32_t keyLen) |
Generate temporary DH key.
| ctx | [IN] Ctx context |
| isExport | [IN] Flag indicating whether the key is for export. |
| keyLen | [IN] Length of the key to generate. |
| typedef uint32_t(* HITLS_DtlsTimerCb) (HITLS_Ctx *ctx, uint32_t us) |
DTLS callback prototype for obtaining the timeout interval
| ctx | [IN] Ctx context |
| us | [IN] Current timeout interval, Unit: microsecond |
| typedef uint64_t(* HITLS_RecordPaddingCb) (HITLS_Ctx *ctx, int32_t type, uint64_t length, void *arg) |
Callback function for handling TLS record padding.
| ctx | [IN] Ctx context |
| type | [IN] Record type |
| length | [IN] Original record length. |
| arg | [IN] User-defined argument for padding. |
| HITLS_NULL_INPUT,the | input parameter pointer is null. |
| HITLS_SUCCESS,if | successful. |
| int32_t HITLS_CFG_AddCAIndication | ( | HITLS_Config * | config, |
| HITLS_TrustedCAType | caType, | ||
| const uint8_t * | data, | ||
| uint32_t | len ) |
Add the CA indicator, which is used when the peer certificate is requested.
| config | [OUT] TLS link configuration |
| caType | [IN] CA indication type |
| data | [IN] CA indication data |
| len | [IN] Data length |
| void HITLS_CFG_ClearCAList | ( | HITLS_Config * | config | ) |
Clear the CA list.
| config | [OUT] TLS link configuration |
| int32_t HITLS_CFG_ClearModeSupport | ( | HITLS_Config * | config, |
| uint32_t | mode ) |
Disable the specified feature.
| config | [OUT] Config handle. |
| mode | [IN] Mode features to be disabled. |
| HITLS_SUCCESS,if | successful. |
| HITLS_NULL_INPUT,config | is null. |
| int32_t HITLS_CFG_ClearTLS13CipherSuites | ( | HITLS_Config * | config | ) |
Clear the TLS1.3 cipher suite.
| config | [IN] Config handle. |
| int32_t HITLS_CFG_EnableTls13SM | ( | HITLS_Config * | config, |
| bool | isOnlySupportSM ) |
Set enable support tls1.3 SM
| config | [IN] Config handle |
| isOnlySupportSM | [OUT] Indicates whether to only support tls1.3 SM |
| HITLS_SUCCESS,if | successful. |
| For | other error codes, see hitls_error.h. |
| void HITLS_CFG_FreeConfig | ( | HITLS_Config * | config | ) |
Release the config file.
| config | [OUT] Config handle. |
| int32_t HITLS_CFG_GetAuthId | ( | const HITLS_Cipher * | cipher, |
| HITLS_AuthAlgo * | authAlg ) |
Obtain the server authorization algorithm type based on the cipher suite.
| cipher | [IN] Cipher suite |
| authAlg | [OUT] Obtained server authorization type. |
| HITLS_SUCCESS,if | successful. |
| For | other error codes, see hitls_error.h. |
| HITLS_TrustedCAList * HITLS_CFG_GetCAList | ( | const HITLS_Config * | config | ) |
Obtain the CA list.
| config | [OUT] TLS link configuration |
| const HITLS_Cipher * HITLS_CFG_GetCipherByID | ( | uint16_t | cipherSuite | ) |
Obtain the cipher suite pointer based on the cipher suite ID.
| cipherSuite | [IN] Cipher suite ID |
| int32_t HITLS_CFG_GetCipherId | ( | const HITLS_Cipher * | cipher, |
| HITLS_CipherAlgo * | cipherAlg ) |
Obtain the symmetric encryption algorithm type based on the cipher suite.
| cipher[IN] | Cipher suite |
| cipherAlg | [OUT] Obtained symmetric encryption algorithm type. |
| HITLS_SUCCESS,if | successful. |
| For | other error codes, see hitls_error.h. |
| int32_t HITLS_CFG_GetCipherServerPreference | ( | const HITLS_Config * | config, |
| bool * | isSupport ) |
Obtains whether the current cipher suite supports preferential selection from the list of algorithms supported by the server.
| config | [IN] TLS link configuration |
| isSupport | [OUT] Support or not |
| HITLS_NULL_INPUT,the | input parameter pointer is null. |
| HITLS_SUCCESS,if | successful. |
| int32_t HITLS_CFG_GetCipherSuite | ( | const HITLS_Cipher * | cipher, |
| uint16_t * | cipherSuite ) |
Obtain the encryption ID in the cipher suite.
| cipher | [IN] Cipher suite. |
| cipherSuite | [OUT] Cipher suite ID. |
| HITLS_CONFIG_UNSUPPORT_CIPHER_SUITE,Unsupported | cipher suites. |
| Minimum | TLS version supported by the given cipher suite. |
| const HITLS_Cipher * HITLS_CFG_GetCipherSuiteByStdName | ( | const uint8_t * | stdName | ) |
Obtain the corresponding cipher suite pointer based on the RFC Standard Name.
| stdName | [IN] RFC Standard Name |
| const uint8_t * HITLS_CFG_GetCipherSuiteName | ( | const HITLS_Cipher * | cipher | ) |
Obtain the cipher suite name based on the cipher suite.
| cipher | [IN] Cipher suite |
| int32_t HITLS_CFG_GetCipherSuites | ( | HITLS_Config * | config, |
| uint16_t * | data, | ||
| uint32_t | dataLen, | ||
| uint32_t * | cipherSuitesSize ) |
Get the supported cipher suites array.
| config | [IN] Config handle. |
| data | [OUT] Array for storing cipher suites. |
| dataLen | [IN] Array length. |
| cipherSuitesSize | [OUT] cipher suite array length. |
| const uint8_t * HITLS_CFG_GetCipherSuiteStdName | ( | const HITLS_Cipher * | cipher | ) |
Obtain the RFC standard name of the cipher suite based on the cipher suite.
| cipherSuite | [IN] cipher suite |
| int32_t HITLS_CFG_GetCipherVersion | ( | const HITLS_Cipher * | cipher, |
| int32_t * | version ) |
Obtain the earliest TLS version supported by the cipher suite based on the cipher suite.
| cipher | [IN] Cipher suite |
| version | [OUT] Obtain the earliest TLS version supported by the cipher suite. |
| HITLS_SUCCESS,if | successful. |
| For | other error codes, see hitls_error.h. |
| int32_t HITLS_CFG_GetClientOnceVerifySupport | ( | HITLS_Config * | config, |
| bool * | isSupport ) |
Query whether request client certificate only once is supported
| config | [IN] Config handle |
| isSupport | [OUT] Indicates whether the client certificate can be requested only once. |
| HITLS_SUCCESS,if | successful. |
| HITLS_NULL_INPUT,config | is null. |
| int32_t HITLS_CFG_GetClientRenegotiateSupport | ( | HITLS_Config * | config, |
| bool * | isSupport ) |
Get whether to allow a renegotiate request from the client
| config | [IN] Config handle |
| isSupport | [OUT] Indicates whether to allow a renegotiate request from the client |
| HITLS_SUCCESS,if | successful. |
| For | other error codes, see hitls_error.h. |
| int32_t HITLS_CFG_GetClientVerifySupport | ( | HITLS_Config * | config, |
| bool * | isSupport ) |
Query whether the client certificate can be verified.
| config | [IN] Config handle |
| isSupport | [OUT] Indicates whether to verify the client certificate. |
| HITLS_SUCCESS,if | successful. |
| HITLS_NULL_INPUT,config | is null. |
| void * HITLS_CFG_GetConfigUserData | ( | const HITLS_Config * | config | ) |
Obtain the user data from the HiTLS Config object. Generally, this function is called during the callback registered with the HiTLS.
| config | [OUT] TLS connection handle. |
| int32_t HITLS_CFG_GetDescription | ( | const HITLS_Cipher * | cipher, |
| uint8_t * | buf, | ||
| int32_t | len ) |
Outputs the description of the cipher suite as a string.
| cipherSuite | [IN] Cipher suite |
| buf | [OUT] Output the description. |
| len | [IN] Description length |
| NULL,Failed | to obtain the description. |
| Description | of the cipher suite |
| int32_t HITLS_CFG_GetDhAutoSupport | ( | HITLS_Config * | config, |
| bool * | isSupport ) |
Query whether the DH parameter can be automatically selected by the user. If yes, the DH parameter will be automatically selected based on the length of the certificate private key.
| config | [IN] Config handle |
| isSupport | [OUT] Indicates whether to support the function of automatically selecting the DH parameter. |
| HITLS_SUCCESS,if | successful. |
| HITLS_NULL_INPUT,config | is null. |
| int32_t HITLS_CFG_GetDtlsCookieExchangeSupport | ( | const HITLS_Config * | config, |
| bool * | isSupport ) |
Return whether the DTLS performs cookie exchange.
| config | [IN] TLS link configuration. |
| isSupport | [OUT] Support or not. |
| HITLS_NULL_INPUT,the | input parameter pointer is null. |
| HITLS_SUCCESS,if | successful. |
| int32_t HITLS_CFG_GetEmptyRecordsNum | ( | const HITLS_Config * | config, |
| uint32_t * | emptyNum ) |
Obtain the max empty records number can be received
| config | [IN] TLS link configuration. |
| emptyNum | [OUT] Indicates the max number of empty records can be received |
| HITLS_NULL_INPUT,the | input parameter pointer is null. |
| HITLS_SUCCESS,if | successful. |
| int32_t HITLS_CFG_GetEncryptThenMac | ( | const HITLS_Config * | config, |
| bool * | encryptThenMacType ) |
Obtain the Encrypt-Then-Mac type.
| config | [IN] TLS link configuration |
| encryptThenMacType | [OUT] Current Encrypt-Then-Mac mode |
| HITLS_NULL_INPUT,the | input parameter pointer is null. |
| HITLS_SUCCESS,if | successful. |
| int32_t HITLS_CFG_GetExtendedMasterSecretMode | ( | HITLS_Config * | config, |
| int32_t * | mode ) |
Get extended master secret mode.
| config | [IN] TLS config handle |
| mode | [OUT] EMS mode. See HITLS_EMS_MODE_*. |
| HITLS_SUCCESS,if | successful. |
| HITLS_NULL_INPUT,if | config or mode is NULL. |
| int32_t HITLS_CFG_GetExtendedMasterSecretSupport | ( | HITLS_Config * | config, |
| bool * | isSupport ) |
Query whether extended master keys are supported.
| config | [IN] Config handle |
| isSupport | [OUT] Indicates whether to support the extended master key. |
| HITLS_SUCCESS,if | successful. |
| HITLS_NULL_INPUT,config | is null. |
| int32_t HITLS_CFG_GetFlightTransmitSwitch | ( | const HITLS_Config * | config, |
| bool * | isEnable ) |
Obtains the status of whether to send handshake information according to the route.
| config | [IN] TLS link configuration. |
| isEnable | [OUT] Indicates whether to send handshake information by route. |
| HITLS_NULL_INPUT,the | input parameter pointer is null. |
| HITLS_SUCCESS,if | successful. |
| int32_t HITLS_CFG_GetHashId | ( | const HITLS_Cipher * | cipher, |
| HITLS_HashAlgo * | hashAlg ) |
Obtain the hash algorithm type based on the cipher suite.
| cipher | [IN] Cipher suite |
| hashAlg | [OUT] Obtained hash algorithm type. |
| HITLS_SUCCESS,if | successful. |
| For | other error codes, see hitls_error.h. |
| int32_t HITLS_CFG_GetKeyExchId | ( | const HITLS_Cipher * | cipher, |
| HITLS_KeyExchAlgo * | kxAlg ) |
Obtain the key exchange algorithm type based on the cipher suite.
| cipher | [IN] Cipher suite |
| kxAlg | [OUT] Obtained key exchange algorithm type. |
| HITLS_SUCCESS,if | successful. |
| For | other error codes, see hitls_error.h. |
| uint32_t HITLS_CFG_GetKeyExchMode | ( | HITLS_Config * | config | ) |
Obtain the key exchange mode, which is used by TLS1.3.
| config | [OUT] TLS link configuration |
| int32_t HITLS_CFG_GetMacId | ( | const HITLS_Cipher * | cipher, |
| HITLS_MacAlgo * | macAlg ) |
Obtain the MAC algorithm type based on the cipher suite.
| cipher | [IN] Cipher suite |
| macAlg | [OUT] Obtained MAC algorithm type. |
| HITLS_SUCCESS,if | successful. |
| For | other error codes, see hitls_error.h. |
| int32_t HITLS_CFG_GetMaxCertList | ( | const HITLS_Config * | config, |
| uint32_t * | maxSize ) |
Obtain the maximum size of the certificate chain that can be sent by the peer end.
| config | [IN] TLS link configuration |
| maxSize | [OUT] Maximum size of the certificate chain that can be sent by the peer end. |
| HITLS_NULL_INPUT,the | input parameter pointer is null. |
| HITLS_SUCCESS,if | successful. |
| int32_t HITLS_CFG_GetMaxSendFragment | ( | const HITLS_Config * | config, |
| uint16_t * | maxSendFragment ) |
Obtain the max send fragment to restrict the amount of plaintext bytes in any record
| config | [IN] TLS link configuration. |
| maxSendFragment | [OUT] Indicates the max send fragment |
| HITLS_NULL_INPUT,the | input parameter pointer is null. |
| HITLS_SUCCESS,if | successful. |
| int32_t HITLS_CFG_GetMaxVersion | ( | const HITLS_Config * | config, |
| uint16_t * | maxVersion ) |
Obtaining the Maximum supported version number
| config | [IN] Config context |
| maxVersion | [OUT] Maximum supported version |
| int32_t HITLS_CFG_GetMinVersion | ( | const HITLS_Config * | config, |
| uint16_t * | minVersion ) |
Obtaining the Minimum Supported Version Number
| config | [IN] Config context |
| minVersion | [OUT] Minimum version supported |
| int32_t HITLS_CFG_GetModeSupport | ( | const HITLS_Config * | config, |
| uint32_t * | mode ) |
Obtain the mode of the function feature in the config file.
| config | [OUT] Config handle |
| mode | [OUT] Mode obtains the output parameters of the mode. |
| HITLS_SUCCESS,if | successful. |
| HITLS_NULL_INPUT,config | is null. |
| int32_t HITLS_CFG_GetNoClientCertSupport | ( | HITLS_Config * | config, |
| bool * | isSupport ) |
Query whether support there is no client certificate. This parameter takes effect only when the client certificate is verified.
| config | [IN] Config handle |
| isSupport | [OUT] Indicates whether to support the function of not having a client certificate. |
| HITLS_SUCCESS,if | successful. |
| HITLS_NULL_INPUT,config | is null. |
| int32_t HITLS_CFG_GetPostHandshakeAuthSupport | ( | HITLS_Config * | config, |
| bool * | isSupport ) |
Query whether the post-handshake AUTH function is supported.
| config | [IN] Config handle |
| isSupport | [OUT] Indicates whether to support post-handshake AUTH. |
| HITLS_SUCCESS,if | successful. |
| HITLS_NULL_INPUT,config | is null. |
| int32_t HITLS_CFG_GetQuietShutdown | ( | const HITLS_Config * | config, |
| int32_t * | mode ) |
Obtain the current quiet disconnection mode.
| config | [IN] TLS link configuration |
| mode | [OUT] Current quiet disconnection mode |
| HITLS_NULL_INPUT,the | input parameter pointer is null. |
| HITLS_SUCCESS,if | successful. |
| int32_t HITLS_CFG_GetReadAhead | ( | HITLS_Config * | config, |
| int32_t * | onOff ) |
Get whether reading ahead has been set or not
| config | [IN] Hitls config |
| onOff | [OUT] Read ahead flag |
| HITLS_NULL_INPUT | |
| HITLS_SUCCESS |
| int32_t HITLS_CFG_GetRecInbufferSize | ( | const HITLS_Config * | config, |
| uint32_t * | recInbufferSize ) |
Obtain the rec inbuffer inital size
| config | [IN] TLS link configuration. |
| recInbufferSize | [OUT] Indicates the rec inbuffer inital size |
| HITLS_NULL_INPUT,the | input parameter pointer is NULL. |
| HITLS_SUCCESS,if | successful. |
| HITLS_RecordPaddingCb HITLS_CFG_GetRecordPaddingCb | ( | HITLS_Config * | config | ) |
Obtains the RecordPadding callback function.
| config | [OUT] Config context |
| HITLS_NULL_INPUT,the | input parameter pointer is null. |
| HITLS_SUCCESS,if | successful. |
| void * HITLS_CFG_GetRecordPaddingCbArg | ( | HITLS_Config * | config | ) |
Obtains the parameter arg required by the RecordPadding callback function.
| config | [OUT] Config context |
| int32_t HITLS_CFG_GetRecordSizeLimit | ( | HITLS_Config * | config, |
| uint16_t * | recordSize ) |
Obtains the record size limit value of ctx.
| config | [OUT] Hitls config |
| recordSize | [IN] the currently in config configured record size limit value |
| HITLS_NULL_INPUT | |
| HITLS_SUCCESS |
| int32_t HITLS_CFG_GetRenegotiationSupport | ( | const HITLS_Config * | config, |
| bool * | isSupport ) |
Query whether renegotiation is supported.
| config | [IN] Config handle |
| isSupport | [OUT] Whether to support renegotiation |
| HITLS_SUCCESS,if | successful. |
| HITLS_NULL_INPUT,config | is null. |
| int32_t HITLS_CFG_GetResumptionOnRenegoSupport | ( | HITLS_Config * | config, |
| bool * | isSupport ) |
Get whether to support session restoration during renegotiation. By default, session restoration is not supported.
| config | [IN] Config handle |
| isSupport | [OUT] Indicates whether to support session restoration during renegotiation. |
| HITLS_SUCCESS,if | successful. |
| For | other error codes, see hitls_error.h. |
| int32_t HITLS_CFG_GetVerifyNoneSupport | ( | HITLS_Config * | config, |
| bool * | isSupport ) |
Query whether not perform dual-ended verification is supported
| config | [IN] Config handle |
| isSupport | [OUT] Indicates whether not perform dual-ended verification is supported |
| HITLS_SUCCESS,if | successful. |
| HITLS_NULL_INPUT,config | is null. |
| int32_t HITLS_CFG_GetVersionSupport | ( | const HITLS_Config * | config, |
| uint32_t * | version ) |
Obtain the supported version number.
| config | [IN] Config handle |
| version | [OUT] Supported version number. |
| HITLS_SUCCESS,if | successful. |
| HITLS_NULL_INPUT,config | is null. |
| int32_t HITLS_CFG_IsDtls | ( | const HITLS_Config * | config, |
| bool * | isDtls ) |
Determine whether to use DTLS.
| config | [IN] TLS link configuration. |
| isDtls | [OUT] Indicates whether to use DTLS. |
| HITLS_Config * HITLS_CFG_NewDTLCPConfig | ( | void | ) |
Create DTLCP configuration items, including the default settings. The user can call the HITLS_CFG_SetXXX interface to modify the settings.
| HITLS_Config,object | pointer succeeded. |
| NULL,object | application failed. |
| HITLS_Config * HITLS_CFG_NewDTLS12Config | ( | void | ) |
Create DTLS12 configuration items, including the default settings. The user can call the HITLS_CFG_SetXXX interface to modify the settings.
| HITLS_Config * HITLS_CFG_NewDTLSConfig | ( | void | ) |
Create full DTLS configurations. The HITLS_CFG_SetXXX interface can be called to modify the DTLS configuration.
| HITLS_Config * HITLS_CFG_NewTLCPConfig | ( | void | ) |
Create TLCP configuration items, including default settings. The user can call the HITLS_CFG_SetXXX interface to modify the settings.
| HITLS_Config * HITLS_CFG_NewTLS12Config | ( | void | ) |
Create a TLS12 configuration item, including the default configuration. The user can call the HITLS_CFG_SetXXX interface to modify the configuration.
| HITLS_Config * HITLS_CFG_NewTLS13Config | ( | void | ) |
Creates the default TLS13 configuration. The HITLS_CFG_SetXXX interface can be used to modify the default TLS13 configuration.
| HITLS_Config * HITLS_CFG_NewTLSConfig | ( | void | ) |
Create full TLS configurations. The HITLS_CFG_SetXXX interface can be used to modify the configurations.
| HITLS_Config * HITLS_CFG_ProviderNewDTLCPConfig | ( | HITLS_Lib_Ctx * | libCtx, |
| const char * | attrName ) |
Create DTLCP configuration items with provider, including the default settings. Same as HITLS_CFG_NewDTLCPConfig except that it requires libCtx and attribute parameters.
| [in] | libCtx | The library context. |
| [in] | attrName | The attribute name. |
| HITLS_Config,object | pointer succeeded. |
| NULL,failed | to apply for the object. |
| HITLS_Config * HITLS_CFG_ProviderNewDTLS12Config | ( | HITLS_Lib_Ctx * | libCtx, |
| const char * | attrName ) |
Create DTLS12 configuration items with provider, including the default settings. Same as HITLS_CFG_NewDTLS12Config except that it requires libCtx and attribute parameters.
| [in] | libCtx | The library context. |
| [in] | attrName | The attribute name. |
| HITLS_Config,object | pointer succeeded. |
| NULL,failed | to apply for the object. |
| HITLS_Config * HITLS_CFG_ProviderNewDTLSConfig | ( | HITLS_Lib_Ctx * | libCtx, |
| const char * | attrName ) |
Create DTLS configuration items with provider, including the default settings. Same as HITLS_CFG_NewDTLSConfig, except that it requires libCtx and attribute parameters.
| [in] | libCtx | The library context. |
| [in] | attrName | The attribute name. |
| HITLS_Config,object | pointer succeeded. |
| NULL,failed | to apply for the object. |
| HITLS_Config * HITLS_CFG_ProviderNewTLCPConfig | ( | HITLS_Lib_Ctx * | libCtx, |
| const char * | attrName ) |
Create TLCP configuration items with provider, including the default settings. Same as HITLS_CFG_NewTLCPConfig except that it requires libCtx and attribute parameters.
| [in] | libCtx | The library context. |
| [in] | attrName | The attribute name. |
| HITLS_Config,object | pointer succeeded. |
| NULL,failed | to apply for the object. |
| HITLS_Config * HITLS_CFG_ProviderNewTLS12Config | ( | HITLS_Lib_Ctx * | libCtx, |
| const char * | attrName ) |
Create TLS12 configuration items with provider, including the default settings. Same as HITLS_CFG_NewTLS12Config, except that it requires libCtx and attribute parameters.
| [in] | libCtx | The library context. |
| [in] | attrName | The attribute name. |
| HITLS_Config,object | pointer succeeded. |
| NULL,failed | to apply for the object. |
| HITLS_Config * HITLS_CFG_ProviderNewTLS13Config | ( | HITLS_Lib_Ctx * | libCtx, |
| const char * | attrName ) |
Create TLS13 configuration items with provider, including the default settings. Same as HITLS_CFG_NewTLS13Config, except that it requires libCtx and attribute parameters.
| [in] | libCtx | The library context. |
| [in] | attrName | The attribute name. |
| HITLS_Config,object | pointer succeeded. |
| NULL,failed | to apply for the object. |
| HITLS_Config * HITLS_CFG_ProviderNewTLSConfig | ( | HITLS_Lib_Ctx * | libCtx, |
| const char * | attrName ) |
Create TLS configuration items with provider, including the default settings. Same as HITLS_CFG_NewTLSConfig except that it requires libCtx and attribute parameters.
| [in] | libCtx | The library context. |
| [in] | attrName | The attribute name. |
| HITLS_Config,object | pointer succeeded. |
| NULL,failed | to apply for the object. |
| int32_t HITLS_CFG_SetCAList | ( | HITLS_Config * | config, |
| HITLS_TrustedCAList * | list ) |
Set the CA list.
| config | [in] TLS link configuration |
| list | [in] CA list |
| HITLS_SUCCESS,if | successful. For details about other error codes, see hitls_error.h. |
| int32_t HITLS_CFG_SetCheckKeyUsage | ( | HITLS_Config * | config, |
| bool | isCheck ) |
Disables the verification of keyusage in the certificate. This function is enabled by default.
| config | [OUT] Config context |
| isCheck | [IN] Sets whether to check key usage. |
| HITLS_NULL_INPUT,the | input parameter pointer is null. |
| HITLS_SUCCESS,if | successful. |
| int32_t HITLS_CFG_SetCipherServerPreference | ( | HITLS_Config * | config, |
| bool | isSupport ) |
cipher suites are preferentially selected from the list of algorithms supported by the server.
| config | [IN] TLS link configuration. |
| isSupport | [IN] Support or not. |
| HITLS_NULL_INPUT,the | input parameter pointer is null. |
| HITLS_SUCCESS,if | successful. |
| int32_t HITLS_CFG_SetCipherSuites | ( | HITLS_Config * | config, |
| const uint16_t * | cipherSuites, | ||
| uint32_t | cipherSuitesSize ) |
Set the supported cipher suites. The sequence of the cipher suites affects the priority of the selected cipher suites. The cipher suite with the highest priority is the first.
| config | [OUT] Config handle. |
| cipherSuites | [IN] cipher suite array, corresponding to the HITLS_CipherSuite enumerated value. |
| cipherSuitesSize | [IN] cipher suite array length. |
| int32_t HITLS_CFG_SetClientHelloCb | ( | HITLS_Config * | config, |
| HITLS_ClientHelloCb | callback, | ||
| void * | arg ) |
Set the cookie verification callback on the server.
| config | [OUT] Config context |
| callback | [IN] ClientHello callback |
| arg | [IN] Product input context |
| int32_t HITLS_CFG_SetClientOnceVerifySupport | ( | HITLS_Config * | config, |
| bool | support ) |
Set whether request client certificate only once is supported
| config | [OUT] TLS link configuration |
| support | [IN] True: yes; False: no. |
| HITLS_SUCCESS,if | successful. |
| HITLS_NULL_INPUT,config | is null. |
| int32_t HITLS_CFG_SetClientRenegotiateSupport | ( | HITLS_Config * | config, |
| bool | support ) |
Set whether to allow a renegotiate request from the client
| config | [OUT] Config handle |
| support | [IN] Whether to support the function. The options are as follows: True: yes; False: no. |
| HITLS_SUCCESS,if | successful. |
| HITLS_NULL_INPUT,config | is null. |
| int32_t HITLS_CFG_SetClientVerifySupport | ( | HITLS_Config * | config, |
| bool | support ) |
Sets whether to verify the client certificate. Client: This setting has no impact Server: The certificate request will be sent.
| config | [OUT] Config handle |
| support | [IN] Indicates whether the client certificate can be verified.True: yes; False: no. |
| HITLS_SUCCESS,if | successful. |
| HITLS_NULL_INPUT,The | config parameter is empty. |
| int32_t HITLS_CFG_SetConfigUserData | ( | HITLS_Config * | config, |
| void * | userData ) |
User data is stored in the HiTLS Config. The user data can be obtained from the callback registered with the HiTLS.
| config | [OUT] TLS connection handle. |
| userData | [IN] User identifier. |
| HITLS_SUCCESS,if | successful. |
| HITLS_NULL_INPUT,The | TLS object pointer of the input parameter is null. |
| int32_t HITLS_CFG_SetConfigUserDataFreeCb | ( | HITLS_Config * | config, |
| HITLS_ConfigUserDataFreeCb | callback ) |
Sets the UserData free callback
| config | [OUT] TLS connection handle |
| userData | [IN] User Data |
| HITLS_SUCCESS | |
| HITLS_NULL_INPUT | The input pointer is null |
| int32_t HITLS_CFG_SetDhAutoSupport | ( | HITLS_Config * | config, |
| bool | support ) |
Set whether the DH parameter can be automatically selected by users. If the value is true, the DH parameter is automatically selected based on the length of the certificate private key. If the value is false, the DH parameter needs to be set.
| config | [OUT] Config handle |
| support | [IN] Whether to support the function. The options are as follows: True: yes; False: no. |
| HITLS_SUCCESS,if | successful. |
| HITLS_NULL_INPUT,config | is null. |
| int32_t HITLS_CFG_SetDtlsCookieExchangeSupport | ( | HITLS_Config * | config, |
| bool | isSupport ) |
Set whether the DTLS performs cookie exchange.
| config | [IN] TLS link configuration |
| isSupport | [IN] Indicates whether to perform cookie exchange. |
| HITLS_NULL_INPUT,the | input parameter pointer is null. |
| HITLS_SUCCESS,if | successful. |
| int32_t HITLS_CFG_SetDtlsPostHsTimeoutVal | ( | HITLS_Config * | config, |
| uint32_t | timeoutVal ) |
Set the timeout period after the DTLS over UDP connection is complete. If the timer expires, the system does not receive the finished message resent by the peer end. If this parameter is set to 0, the default value 240 seconds is used.
| config | [IN] TLS link configuration |
| timeoutVal | [IN] Timeout time |
| HITLS_NULL_INPUT,the | input parameter pointer is null. |
| HITLS_SUCCESS,if | successful. |
| int32_t HITLS_CFG_SetDtlsTimerCb | ( | HITLS_Config * | config, |
| HITLS_DtlsTimerCb | callback ) |
Set the DTLS obtaining timeout interval callback.
| config | [OUT] Config context |
| callback | [IN] DTLS callback for obtaining the timeout interval |
| int32_t HITLS_CFG_SetEcPointFormats | ( | HITLS_Config * | config, |
| const uint8_t * | pointFormats, | ||
| uint32_t | pointFormatsSize ) |
Set the format of the ec point.
| config | [OUT] Config context. |
| pointFormats | [IN] EC point format, corresponding to the HITLS_ECPointFormat enumerated value. |
| pointFormatsSize | [IN] EC point format length |
| int32_t HITLS_CFG_SetEmptyRecordsNum | ( | HITLS_Config * | config, |
| uint32_t | emptyNum ) |
Set the max empty records number can be received
| config | [IN/OUT] TLS link configuration |
| emptyNum | [IN] Indicates the max number of empty records can be received |
| HITLS_NULL_INPUT,the | input parameter pointer is null. |
| HITLS_SUCCESS,if | successful. |
| int32_t HITLS_CFG_SetEncryptThenMac | ( | HITLS_Config * | config, |
| bool | encryptThenMacType ) |
Set the Encrypt-Then-Mac mode.
| config | [IN] TLS link configuration |
| encryptThenMacType | [IN] Current Encrypt-Then-Mac mode. |
| HITLS_NULL_INPUT,the | input parameter pointer is null. |
| HITLS_SUCCESS,if | successful. |
| int32_t HITLS_CFG_SetEndPoint | ( | HITLS_Config * | config, |
| bool | isClient ) |
Set whether the current configuration is a client configuration.
| config | [OUT] Config context. |
| isClient | [IN] Indicates whether it is a client configuration. |
| HITLS_SUCCESS,if | successful. For details about other error codes, see hitls_error.h. |
| int32_t HITLS_CFG_SetExtendedMasterSecretMode | ( | HITLS_Config * | config, |
| int32_t | mode ) |
Set extended master secret mode.
| config | [IN] TLS config handle |
| mode | [IN] EMS mode. See HITLS_EMS_MODE_*. |
| HITLS_SUCCESS,if | successful. |
| HITLS_NULL_INPUT,if | config is NULL. |
| HITLS_INVALID_INPUT,if | mode is invalid. |
| int32_t HITLS_CFG_SetExtendedMasterSecretSupport | ( | HITLS_Config * | config, |
| bool | support ) |
Sets whether to forcibly support extended master keys.
| config | [OUT] Config handle |
| support | [IN] Indicates whether to forcibly support extended master keys. The options are as follows: True: yes; False: no. The default value is true. |
| HITLS_SUCCESS. | |
| HITLS_NULL_INPUT,config | is NULL |
| int32_t HITLS_CFG_SetFlightTransmitSwitch | ( | HITLS_Config * | config, |
| bool | isEnable ) |
Set whether to send handshake messages by route. DTLS over SCTP does not support this ability.
| config | [IN/OUT] TLS link configuration |
| isEnable | [IN] Indicates whether to enable the function of sending handshake information by range. 0 indicates that the function is disabled. Other values indicate that the function is enabled. |
| HITLS_NULL_INPUT,the | input parameter pointer is null. |
| HITLS_SUCCESS,if | successful. |
| int32_t HITLS_CFG_SetGroupList | ( | HITLS_Config * | config, |
| const char * | groupNames, | ||
| uint32_t | groupNamesLen ) |
Set the group supported during key exchange. The group supported by HiTLS can be queried in HITLS_NamedGroup.
| config | [OUT] Config context. |
| groupNames | [IN] Key exchange group. Separate with colons, for example, "HITLS_EC_GROUP_SECP256R1:HITLS_EC_GROUP_SECP384R1" |
| groupNamesLen | [IN] Key exchange group string length |
| int32_t HITLS_CFG_SetGroups | ( | HITLS_Config * | config, |
| const uint16_t * | groups, | ||
| uint32_t | groupsSize ) |
Set the group supported during key exchange. The group supported by HiTLS can be queried in HITLS_NamedGroup.
| config | [OUT] Config context. |
| groups | [IN] Key exchange group. Corresponds to the HITLS_NamedGroup enumerated value. |
| groupsSize | [IN] Group length |
| int32_t HITLS_CFG_SetKeepPeerCertificate | ( | HITLS_Config * | config, |
| bool | isKeepPeerCert ) |
Set whether to save the peer certificate.
| config | [IN] Hitls config. |
| isKeepPeerCert | [IN] Set whether to save the peer certificate. |
| HITLS_SUCCESS,if | successful. |
| For | other error codes, see hitls_error.h. |
| int32_t HITLS_CFG_SetKeyExchMode | ( | HITLS_Config * | config, |
| uint32_t | mode ) |
Set the key exchange mode, which is used by TLS1.3.
| config | [OUT] TLS link configuration |
| mode | [IN] PSK key exchange mode. Currently, only TLS13_KE_MODE_PSK_ONLY and TLS13_KE_MODE_PSK_WITH_DHE are supported. The corresponding bit is set to 1. |
| int32_t HITLS_CFG_SetLegacyRenegotiateSupport | ( | HITLS_Config * | config, |
| bool | support ) |
Set whether to abort handshake when server doesn't support SecRenegotiation
| config | [OUT] Config handle |
| support | [IN] Whether to support the function. The options are as follows: True: yes; False: no. |
| HITLS_SUCCESS,if | successful. |
| HITLS_NULL_INPUT,config | is null. |
| int32_t HITLS_CFG_SetMaxCertList | ( | HITLS_Config * | config, |
| uint32_t | maxSize ) |
Set the maximum size of the certificate chain that can be sent by the peer end.
| config | [IN/OUT] TLS link configuration. |
| maxSize | [IN] Set the maximum size of the certificate chain that can be sent by the peer end. |
| HITLS_NULL_INPUT,the | input parameter pointer is null. |
| HITLS_SUCCESS,if | successful. |
| int32_t HITLS_CFG_SetMaxSendFragment | ( | HITLS_Config * | config, |
| uint16_t | maxSendFragment ) |
Set the max send fragment to restrict the amount of plaintext bytes in any record
| config | [IN/OUT] TLS link configuration |
| maxSendFragment | [IN] Indicates the max send fragment to restrict the amount of plaintext bytes in any record |
| HITLS_NULL_INPUT,the | input parameter pointer is null. |
| HITLS_CONFIG_INVALID_LENGTH,the | maxSendFragment is less than 64 or greater than 16384. |
| HITLS_SUCCESS,if | successful. |
| int32_t HITLS_CFG_SetModeSupport | ( | HITLS_Config * | config, |
| uint32_t | mode ) |
Set the function to support the specified feature.
| config | [OUT] Config handle. |
| mode | [IN] Mode features to be enabled. |
| HITLS_SUCCESS,if | successful. |
| HITLS_NULL_INPUT,config | is null. |
| int32_t HITLS_CFG_SetNeedCheckPmsVersion | ( | HITLS_Config * | config, |
| bool | needCheck ) |
This interface is used to verify the version in the premaster secret. This interface takes effect on the server. The version must be earlier than 1.0, including 1.0.
| config | [OUT] Config handle. |
| needCheck | [IN] Indicates whether to perform verification. |
| HITLS_SUCCESS,if | successful. |
| HITLS_NULL_INPUT,config | is null. |
| int32_t HITLS_CFG_SetNoClientCertSupport | ( | HITLS_Config * | config, |
| bool | support ) |
Sets whether to allow the client certificate to be empty. This parameter takes effect only when client certificate verification is enabled. Client: This setting has no impact Server: Check whether the certificate passes the verification when receiving an empty certificate from the client. The verification fails by default.
| config | [OUT] Config handle |
| support | [IN] Indicates whether the authentication is successful when no client certificate is available. true: The server still passes the verification when the certificate sent by the client is empty. false: The server fails to pass the verification when the certificate sent by the client is empty. |
| HITLS_SUCCESS,if | successful. |
| HITLS_NULL_INPUT,The | config parameter is empty. |
| int32_t HITLS_CFG_SetPostHandshakeAuthSupport | ( | HITLS_Config * | config, |
| bool | support ) |
Setting whether to support post-handshake auth takes effect only for TLS1.3. client: If the client supports pha, the client sends pha extensions. Server: supports pha. After the handshake, the upper-layer interface HITLS_VerifyClientPostHandshake initiates certificate verification.
| config | [OUT] Config handle |
| support | [IN] Whether to support pha True: pha is supported. False: pha is not supported. |
| HITLS_SUCCESS,if | successful. |
| HITLS_NULL_INPUT,The | config parameter is empty. |
| int32_t HITLS_CFG_SetQuietShutdown | ( | HITLS_Config * | config, |
| int32_t | mode ) |
Set the quiet disconnection mode.
| config | [IN] TLS link configuration |
| mode | [IN] Mode type. The value 0 indicates that the quiet disconnection mode is disabled, and the value 1 indicates that the quiet disconnection mode is enabled. |
| HITLS_SUCCESS,if | successful. |
| For | other error codes, see hitls_error.h. |
| int32_t HITLS_CFG_SetReadAhead | ( | HITLS_Config * | config, |
| int32_t | onOff ) |
Set read ahead flag to indicate whether read more data than user required to buffer in advance
| config | [OUT] Hitls config |
| onOff | [IN] Read ahead flag, nonzero value indicates open, zero indicates close |
| HITLS_NULL_INPUT | |
| HITLS_SUCCESS |
| int32_t HITLS_CFG_SetRecInbufferSize | ( | HITLS_Config * | config, |
| uint32_t | recInbufferSize ) |
Set the rec inbuffer inital size
| config | [IN/OUT] TLS link configuration |
| recInbufferSize | [IN] Indicates the rec inbuffer inital size |
| HITLS_NULL_INPUT,the | input parameter pointer is NULL. |
| HITLS_CONFIG_INVALID_LENGTH,the | recInbufferSize is less than 512 or greater than 18432. |
| HITLS_SUCCESS,if | successful. |
| int32_t HITLS_CFG_SetRecordPaddingCb | ( | HITLS_Config * | config, |
| HITLS_RecordPaddingCb | callback ) |
Set the RecordPadding callback.
| config | [OUT] Config context |
| callback | [IN] RecordPadding Callback |
| HITLS_NULL_INPUT,the | input parameter pointer is null. |
| HITLS_SUCCESS,if | successful. |
| int32_t HITLS_CFG_SetRecordPaddingCbArg | ( | HITLS_Config * | config, |
| void * | arg ) |
Sets the parameters arg required by the RecordPadding callback function.
| config | [OUT] Config context |
| arg | [IN] Related parameters arg |
| HITLS_NULL_INPUT,the | input parameter pointer is null. |
| HITLS_SUCCESS,if | successful. |
| int32_t HITLS_CFG_SetRecordSizeLimit | ( | HITLS_Config * | config, |
| uint16_t | recordSize ) |
The default record size limit is 0 to unsupport the record size limit extension (RFC 8449). If negotiated, it is used only to limit the size of records sent by the peer in the receive direction. However, the record size sent to the peer is limited by the record size limit value of the peer.
| config | [OUT] Hitls config |
| recordSize | [IN] Set the default record size limit value to be negotiated (64 to 16385) |
| HITLS_NULL_INPUT | |
| HITLS_SUCCESS |
| int32_t HITLS_CFG_SetRenegotiationSupport | ( | HITLS_Config * | config, |
| bool | support ) |
Set whether to support renegotiation.
| config | [OUT] Config handle |
| support | [IN] Whether to support the function. The options are as follows: True: yes; False: no. |
| HITLS_SUCCESS,if | successful. |
| HITLS_NULL_INPUT,config | is null. |
| int32_t HITLS_CFG_SetResumptionOnRenegoSupport | ( | HITLS_Config * | config, |
| bool | support ) |
Set whether to support session restoration during renegotiation. By default, session restoration is not supported.
| config | [OUT] Config handle |
| support | [IN] Whether to support the function. The options are as follows: True: yes; False: no. |
| HITLS_SUCCESS,if | successful. |
| HITLS_NULL_INPUT,config | is null. |
| int32_t HITLS_CFG_SetSignature | ( | HITLS_Config * | config, |
| const uint16_t * | signAlgs, | ||
| uint16_t | signAlgsSize ) |
Set the signature algorithms supported during negotiation. The signature algorithms supported by the HiTLS can be queried in the HITLS_SignHashAlgo file.
| config | [OUT] Config context |
| signAlgs | [IN] Signature algorithm array, that is, the enumerated value of HITLS_SignHashAlgo. |
| signAlgsSize | [IN] Signature algorithm array length |
| int32_t HITLS_CFG_SetTmpDh | ( | HITLS_Config * | config, |
| HITLS_CRYPT_Key * | dhPkey ) |
Set the DH parameter specified by the user.
| config | [OUT] Config handle |
| dhPkey | [IN] User-specified DH key. |
| HITLS_SUCCESS,if | successful. |
| HITLS_NULL_INPUT,config | is empty, or dhPkey is empty. |
| int32_t HITLS_CFG_SetTmpDhCb | ( | HITLS_Config * | config, |
| HITLS_DhTmpCb | callback ) |
Set the TmpDh callback, cb can be NULL.
| config | [OUT] Config Context. |
| callback | [IN] TmpDh Callback. |
| HITLS_NULL_INPUT,the | input parameter pointer is null. |
| HITLS_SUCCESS,if | successful. |
| int32_t HITLS_CFG_SetVerifyNoneSupport | ( | HITLS_Config * | config, |
| bool | support ) |
Sets whether to support not perform dual-ended verification
| config | [IN] Config handle |
| support | [IN] True: yes; False: no. |
| HITLS_SUCCESS,if | successful. |
| HITLS_NULL_INPUT,config | is null. |
| int32_t HITLS_CFG_SetVersion | ( | HITLS_Config * | config, |
| uint16_t | minVersion, | ||
| uint16_t | maxVersion ) |
Set the supported version number range.
| config | [OUT] Config handle |
| minVersion | [IN] Minimum version number |
| maxVersion | [IN] Maximum version number |
| HITLS_SUCCESS,if | successful. |
| HITLS_NULL_INPUT,config | is null. |
| int32_t HITLS_CFG_SetVersionForbid | ( | HITLS_Config * | config, |
| uint32_t | noVersion ) |
Setting the disabled version number.
| config | [OUT] Config handle |
| noversion | [IN] Disabled version number. |
| HITLS_SUCCESS,if | successful. |
| HITLS_NULL_INPUT,config | is null. |
| int32_t HITLS_CFG_SetVersionSupport | ( | HITLS_Config * | config, |
| uint32_t | version ) |
Set the supported version number.
| config | [OUT] Config handle |
| version | [IN] Supported version number. |
| HITLS_SUCCESS,if | successful. |
| HITLS_NULL_INPUT,config | is null. |
| int32_t HITLS_CFG_UpRef | ( | HITLS_Config * | config | ) |
The reference counter of config increases by 1.
| config | [OUT] Config handle. |
| HITLS_SUCCESS,if | successful. |
| HITLS_NULL_INPUT,config | is null. |
| int32_t HITLS_CIPHER_IsAead | ( | const HITLS_Cipher * | cipher, |
| bool * | isAead ) |
Determine whether to use the AEAD algorithm based on the cipher suite information.
| cipher | [IN] Cipher suite information |
| isAead | [OUT] Indicates whether to use the AEAD algorithm. |