openHiTLS API openHiTLS 0.1.0-Alpha1
hitls.h
浏览该文件的文档.
1/*---------------------------------------------------------------------------------------------
2 * This file is part of the openHiTLS project.
3 * Copyright © 2023 Huawei Technologies Co.,Ltd. All rights reserved.
4 * Licensed under the openHiTLS Software license agreement 1.0. See LICENSE in the project root
5 * for license information.
6 *---------------------------------------------------------------------------------------------
7 */
8
15#ifndef HITLS_H
16#define HITLS_H
17
18#include <stdint.h>
19#include <stddef.h>
20#include "hitls_type.h"
21#include "hitls_config.h"
22#include "hitls_cert_type.h"
23#include "bsl_uio.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
41
50
67int32_t HITLS_SetUio(HITLS_Ctx *ctx, BSL_UIO *uio);
68
81
90
99
122
132int32_t HITLS_SetEndPoint(HITLS_Ctx *ctx, bool isClient);
133
156
177int32_t HITLS_Read(HITLS_Ctx *ctx, uint8_t *data, uint32_t bufSize, uint32_t *readLen);
178
196int32_t HITLS_Write(HITLS_Ctx *ctx, const uint8_t *data, uint32_t dataLen);
197
207int32_t HITLS_GetMaxWriteSize(const HITLS_Ctx *ctx, uint32_t *len);
208
219void *HITLS_GetUserData(const HITLS_Ctx *ctx);
220
234int32_t HITLS_SetUserData(HITLS_Ctx *ctx, void *userData);
235
247int32_t HITLS_Close(HITLS_Ctx *ctx);
248
266int32_t HITLS_SetShutdownState(HITLS_Ctx *ctx, uint32_t mode);
267
277int32_t HITLS_GetShutdownState(const HITLS_Ctx *ctx, uint32_t *mode);
278
288int32_t HITLS_GetNegotiatedVersion(const HITLS_Ctx *ctx, uint16_t *version);
289
299int32_t HITLS_GetMaxProtoVersion(const HITLS_Ctx *ctx, uint16_t *maxVersion);
300
310int32_t HITLS_GetMinProtoVersion(const HITLS_Ctx *ctx, uint16_t *minVersion);
311
326int32_t HITLS_SetMinProtoVersion(HITLS_Ctx *ctx, uint16_t version);
327
342int32_t HITLS_SetMaxProtoVersion(HITLS_Ctx *ctx, uint16_t version);
343
353int32_t HITLS_IsAead(const HITLS_Ctx *ctx, uint8_t *isAead);
354
364int32_t HITLS_IsDtls(const HITLS_Ctx *ctx, uint8_t *isDtls);
365
375int32_t HITLS_SetErrorCode(HITLS_Ctx *ctx, int32_t errorCode);
376
384int32_t HITLS_GetErrorCode(const HITLS_Ctx *ctx);
385
395int32_t HITLS_IsHandShakeDone(const HITLS_Ctx *ctx, uint8_t *isDone);
396
406int32_t HITLS_IsServer(const HITLS_Ctx *ctx, uint8_t *isServer);
407
419int32_t HITLS_ReadHasPending(const HITLS_Ctx *ctx, uint8_t *isPending);
420
433
443int32_t HITLS_GetPeerSignScheme(const HITLS_Ctx *ctx, HITLS_SignHashAlgo *peerSignScheme);
444
454int32_t HITLS_GetLocalSignScheme(const HITLS_Ctx *ctx, HITLS_SignHashAlgo *localSignScheme);
455
466int32_t HITLS_SetEcGroups(HITLS_Ctx *ctx, uint16_t *lst, uint32_t groupSize);
467
478int32_t HITLS_SetSigalgsList(HITLS_Ctx *ctx, const uint16_t *signAlgs, uint16_t signAlgsSize);
479
491int32_t HITLS_SetEcPointFormats(HITLS_Ctx *ctx, const uint8_t *pointFormats, uint32_t pointFormatsSize);
492
503int32_t HITLS_SetClientVerifySupport(HITLS_Ctx *ctx, bool support);
504
521int32_t HITLS_SetNoClientCertSupport(HITLS_Ctx *ctx, bool support);
522
533
543int32_t HITLS_SetVerifyNoneSupport(HITLS_Ctx *ctx, bool support);
544
554int32_t HITLS_SetClientOnceVerifySupport(HITLS_Ctx *ctx, bool support);
555
565
575
590int32_t HITLS_SetCipherSuites(HITLS_Ctx *ctx, const uint16_t *cipherSuites, uint32_t cipherSuitesSize);
591
601
615int32_t HITLS_GetRandom(const HITLS_Ctx *ctx, uint8_t *out, uint32_t *outlen, bool isClient);
616
626int32_t HITLS_GetHandShakeState(const HITLS_Ctx *ctx, uint32_t *state);
627
634const char *HITLS_GetStateString(uint32_t state);
635
645int32_t HITLS_IsHandShaking(const HITLS_Ctx *ctx, uint8_t *isHandShaking);
646
656int32_t HITLS_GetRenegotiationSupport(const HITLS_Ctx *ctx, uint8_t *isSupportRenegotiation);
657
667int32_t HITLS_IsBeforeHandShake(const HITLS_Ctx *ctx, uint8_t *isBefore);
668
678int32_t HITLS_SetMtu(HITLS_Ctx *ctx, long mtu);
679
689int32_t HITLS_GetClientVersion(const HITLS_Ctx *ctx, uint16_t *clientVersion);
690
701
711int32_t HITLS_IsClient(const HITLS_Ctx *ctx, bool *isClient);
712
722int32_t HITLS_KeyUpdate(HITLS_Ctx *ctx, uint32_t updateType);
723
733
752int32_t HITLS_GetSharedGroup(const HITLS_Ctx *ctx, int32_t nmatch, uint16_t *groupId);
753
763int32_t HITLS_GetVersionSupport(const HITLS_Ctx *ctx, uint32_t *version);
764
780int32_t HITLS_SetVersionSupport(HITLS_Ctx *ctx, uint32_t version);
781
797int32_t HITLS_SetVersion(HITLS_Ctx *ctx, uint32_t minVersion, uint32_t maxVersion);
798
808int32_t HITLS_SetVersionForbid(HITLS_Ctx *ctx, uint32_t noVersion);
809
823int32_t HITLS_SetNeedCheckPmsVersion(HITLS_Ctx *ctx, bool needCheck);
824
835int32_t HITLS_SetQuietShutdown(HITLS_Ctx *ctx, int32_t mode);
836
846int32_t HITLS_GetQuietShutdown(const HITLS_Ctx *ctx, int32_t *mode);
847
860int32_t HITLS_SetDhAutoSupport(HITLS_Ctx *ctx, bool support);
861
872
883
893
903int32_t HITLS_SetRecordPaddingCbArg(HITLS_Ctx *ctx, void *arg);
904
914
926int32_t HITLS_GetPeerFinishVerifyData(const HITLS_Ctx *ctx, void *buf, uint32_t bufLen, uint32_t *dataLen);
927
937int32_t HITLS_SetCloseCheckKeyUsage(HITLS_Ctx *ctx, bool isClose);
938
950int32_t HITLS_GetFinishVerifyData(const HITLS_Ctx *ctx, void *buf, uint32_t bufLen, uint32_t *dataLen);
951
961int32_t HITLS_GetSecureRenegotiationSupport(const HITLS_Ctx *ctx, uint8_t *isSecureRenegotiation);
962
989
1003int32_t HITLS_GetRenegotiationState(const HITLS_Ctx *ctx, uint8_t *isRenegotiationState);
1004
1005
1015int32_t HITLS_GetRwstate(const HITLS_Ctx *ctx, uint8_t *rwstate);
1016
1026int32_t HITLS_GetClientVerifySupport(HITLS_Ctx *ctx, uint8_t *isSupport);
1027
1038int32_t HITLS_GetNoClientCertSupport(HITLS_Ctx *ctx, uint8_t *isSupport);
1039
1049int32_t HITLS_GetPostHandshakeAuthSupport(HITLS_Ctx *ctx, uint8_t *isSupport);
1050
1060int32_t HITLS_GetVerifyNoneSupport(HITLS_Ctx *ctx, uint8_t *isSupport);
1061
1071int32_t HITLS_GetClientOnceVerifySupport(HITLS_Ctx *ctx, uint8_t *isSupport);
1072
1073
1083int32_t HITLS_ClearRenegotiationNum(HITLS_Ctx *ctx, uint32_t *renegotiationNum);
1084
1094int32_t HITLS_GetNegotiateGroup(const HITLS_Ctx *ctx, uint16_t *group);
1095
1105int32_t HITLS_SetEncryptThenMac(HITLS_Ctx *ctx, uint32_t encryptThenMacType);
1106
1116int32_t HITLS_GetEncryptThenMac(const HITLS_Ctx *ctx, uint32_t *encryptThenMacType);
1117
1128int32_t HITLS_SetServerName(HITLS_Ctx *ctx, uint8_t *serverName, uint32_t serverNameStrlen);
1129
1139int32_t HITLS_SetCipherServerPreference(HITLS_Ctx *ctx, bool isSupport);
1140
1151int32_t HITLS_GetCipherServerPreference(const HITLS_Ctx *ctx, bool *isSupport);
1152
1162int32_t HITLS_SetRenegotiationSupport(HITLS_Ctx *ctx, bool isSupport);
1163
1173int32_t HITLS_SetSessionTicketSupport(HITLS_Ctx *ctx, bool isSupport);
1174
1184int32_t HITLS_GetSessionTicketSupport(const HITLS_Ctx *ctx, uint8_t *isSupport);
1185
1196int32_t HITLS_SetFlightTransmitSwitch(HITLS_Ctx *ctx, uint8_t isEnable);
1197
1207int32_t HITLS_GetFlightTransmitSwitch(const HITLS_Ctx *ctx, uint8_t *isEnable);
1208
1219int32_t HITLS_GetAllAsyncFds(HITLS_Ctx *ctx, int *fd, int *fdNums);
1220
1229
1239int32_t HITLS_SetMaxCertList(HITLS_Ctx *ctx, uint32_t maxSize);
1240
1250int32_t HITLS_GetMaxCertList(const HITLS_Ctx *ctx, uint32_t *maxSize);
1251
1263#ifdef __cplusplus
1264}
1265#endif
1266
1267#endif /* HITLS_H */
const char * HITLS_GetStateString(uint32_t state)
Obtain the handshake status character string.
uint64_t(* HITLS_RecordPaddingCb)(HITLS_Ctx *ctx, int32_t type, uint64_t length, void *arg)
Definition hitls_config.h:1174
void HITLS_CRYPT_Key
Key handle, which is converted into the corresponding structure based on the algorithm library used b...
Definition hitls_crypt_type.h:29
struct UIO_ControlBlock BSL_UIO
UIO module control structure
Definition bsl_uio.h:30
BSL_UIO * HITLS_GetReadUio(const HITLS_Ctx *ctx)
Obtain the UIO object of the read data.
int32_t HITLS_Renegotiate(HITLS_Ctx *ctx)
Perform renegotiation.
int32_t HITLS_SetDhAutoSupport(HITLS_Ctx *ctx, bool support)
Sets whether to support the function of automatically selecting DH parameters.
int32_t HITLS_GetEncryptThenMac(const HITLS_Ctx *ctx, uint32_t *encryptThenMacType)
Obtains the Encrypt-Then-Mac type
int32_t HITLS_ClearTLS13CipherSuites(HITLS_Ctx *ctx)
Clears the configured TLS1.3 cipher suite.
int32_t HITLS_SetEncryptThenMac(HITLS_Ctx *ctx, uint32_t encryptThenMacType)
Setting the Encrypt-Then-Mac mode.
int32_t HITLS_GetMinProtoVersion(const HITLS_Ctx *ctx, uint16_t *minVersion)
Obtain the latest protocol version.
int32_t HITLS_SetMinProtoVersion(HITLS_Ctx *ctx, uint16_t version)
Set the minimum protocol version based on the specified version.
int32_t HITLS_ClearRenegotiationNum(HITLS_Ctx *ctx, uint32_t *renegotiationNum)
Clears the renegotiation count.
int32_t HITLS_SetNoClientCertSupport(HITLS_Ctx *ctx, bool support)
Set whether to support the function without the client certificate, Takes effect only when the client...
int32_t HITLS_GetFinishVerifyData(const HITLS_Ctx *ctx, void *buf, uint32_t bufLen, uint32_t *dataLen)
Obtain the verification data and length of the local end based on the sent finished message.
int32_t HITLS_SetVerifyNoneSupport(HITLS_Ctx *ctx, bool support)
Set whether to support do not proceed dual-ended verification.
int32_t HITLS_SetEcGroups(HITLS_Ctx *ctx, uint16_t *lst, uint32_t groupSize)
Set the group supported by the hitls object.
int32_t HITLS_GetNegotiatedVersion(const HITLS_Ctx *ctx, uint16_t *version)
Obtain the HiTLS negotiation version.
int32_t HITLS_GetFlightTransmitSwitch(const HITLS_Ctx *ctx, uint8_t *isEnable)
Obtains the status of whether to send handshake information according to the flight distance.
int32_t HITLS_GetVersionSupport(const HITLS_Ctx *ctx, uint32_t *version)
Obtain the supported version number.
int32_t HITLS_GetHandShakeState(const HITLS_Ctx *ctx, uint32_t *state)
Obtain the current handshake status.
int32_t HITLS_SetCloseCheckKeyUsage(HITLS_Ctx *ctx, bool isClose)
Disables the verification of keyusage in the certificate. This function is enabled by default.
int32_t HITLS_SetClientVerifySupport(HITLS_Ctx *ctx, bool support)
Set whether to verify the client certificate.
int32_t HITLS_GetVerifyNoneSupport(HITLS_Ctx *ctx, uint8_t *isSupport)
Query if support is available for not performing dual-end verification.
int32_t HITLS_SetPostHandshakeAuthSupport(HITLS_Ctx *ctx, bool support)
Set whether to support post-handshake AUTH.
int32_t HITLS_SetReadUio(HITLS_Ctx *ctx, BSL_UIO *uio)
Read UIO for the HiTLS context.
int32_t HITLS_SetRenegotiationSupport(HITLS_Ctx *ctx, bool isSupport)
Sets whether to support renegotiation.
const HITLS_Config * HITLS_GetConfig(const HITLS_Ctx *ctx)
Obtain the value of hitlsConfig.
int32_t HITLS_Connect(HITLS_Ctx *ctx)
The client starts the handshake with the TLS server.
int32_t HITLS_SetTmpDh(HITLS_Ctx *ctx, HITLS_CRYPT_Key *dhPkey)
Set the DH parameter specified by the user.
int32_t HITLS_VerifyClientPostHandshake(HITLS_Ctx *ctx)
This interface is valid only on the server. When the post-handshake command is configured,...
int32_t HITLS_SetCipherSuites(HITLS_Ctx *ctx, const uint16_t *cipherSuites, uint32_t cipherSuitesSize)
Set the supported key suites.
int32_t HITLS_SetVersionSupport(HITLS_Ctx *ctx, uint32_t version)
Set the supported version number.
int32_t HITLS_SetSessionTicketSupport(HITLS_Ctx *ctx, bool isSupport)
Sets whether to support session tickets.
void * HITLS_GetUserData(const HITLS_Ctx *ctx)
Obtain user data from the HiTLS context. This interface is called in the callback registered with the...
int32_t HITLS_GetSessionTicketSupport(const HITLS_Ctx *ctx, uint8_t *isSupport)
Check whether the session ticket is supported.
int32_t HITLS_GetClientVersion(const HITLS_Ctx *ctx, uint16_t *clientVersion)
Obtain the version number set by the client in ClientHello.
int32_t HITLS_GetClientVerifySupport(HITLS_Ctx *ctx, uint8_t *isSupport)
Check whether the client certificate can be verified.
int32_t HITLS_SetQuietShutdown(HITLS_Ctx *ctx, int32_t mode)
Set the silent disconnection mode.
int32_t HITLS_SetServerName(HITLS_Ctx *ctx, uint8_t *serverName, uint32_t serverNameStrlen)
Setting the value of server_name.
int32_t HITLS_KeyUpdate(HITLS_Ctx *ctx, uint32_t updateType)
Set the keyupdate type of the current context and send the keyupdate message.
int32_t HITLS_GetRwstate(const HITLS_Ctx *ctx, uint8_t *rwstate)
Obtain the current internal status.
int32_t HITLS_GetKeyUpdateType(HITLS_Ctx *ctx)
Return the keyupdate type of the current context.
int32_t HITLS_Close(HITLS_Ctx *ctx)
Close the TLS connection.
int32_t HITLS_SetShutdownState(HITLS_Ctx *ctx, uint32_t mode)
Set the shutdown status of the TLS link.
void * HITLS_GetRecordPaddingCbArg(HITLS_Ctx *ctx)
Obtains the parameter arg required by the RecordPadding callback function.
int32_t HITLS_SetRecordPaddingCbArg(HITLS_Ctx *ctx, void *arg)
Sets the parameters arg required by the RecordPadding callback function.
void HITLS_Free(HITLS_Ctx *ctx)
Release the TLS connection.
int32_t HITLS_SetUio(HITLS_Ctx *ctx, BSL_UIO *uio)
Set the UIO object for the HiTLS context.
int32_t HITLS_SetClientOnceVerifySupport(HITLS_Ctx *ctx, bool support)
Set whether the client certificate can be requested only once.
int32_t HITLS_GetPostHandshakeAuthSupport(HITLS_Ctx *ctx, uint8_t *isSupport)
Query whether post-handshake AUTH is supported
int32_t HITLS_GetNoClientCertSupport(HITLS_Ctx *ctx, uint8_t *isSupport)
Check whether no client certificate is supported, This command is valid only when client certificate ...
int32_t HITLS_SetMtu(HITLS_Ctx *ctx, long mtu)
Set the MTU of a path.
int32_t HITLS_IsDtls(const HITLS_Ctx *ctx, uint8_t *isDtls)
Check whether DTLS is used.
int32_t HITLS_IsServer(const HITLS_Ctx *ctx, uint8_t *isServer)
Indicates whether the HiTLS object functions as the server.
int32_t HITLS_SetErrorCode(HITLS_Ctx *ctx, int32_t errorCode)
Record the error value of the HiTLS link.
int32_t HITLS_GetMaxWriteSize(const HITLS_Ctx *ctx, uint32_t *len)
Obtain the maximum writable (plaintext) length.
int32_t HITLS_SetNeedCheckPmsVersion(HITLS_Ctx *ctx, bool needCheck)
Sets whether to verify the version in the premaster secret.
BSL_UIO * HITLS_GetUio(const HITLS_Ctx *ctx)
Obtain the UIO object from the HiTLS context.
int32_t HITLS_GetNegotiateGroup(const HITLS_Ctx *ctx, uint16_t *group)
Obtain the negotiated group information.
int32_t HITLS_GetErrorCode(const HITLS_Ctx *ctx)
Obtain the error value of the HiTLS link.
int32_t HITLS_IsHandShaking(const HITLS_Ctx *ctx, uint8_t *isHandShaking)
Check whether a handshake is being performed.
int32_t HITLS_get_ex_data_X509_STORE_CTX_idx(void)
Obtains the certificate-based user data index number.
int32_t HITLS_GetRenegotiationSupport(const HITLS_Ctx *ctx, uint8_t *isSupportRenegotiation)
Obtain whether renegotiation is supported.
int32_t HITLS_IsBeforeHandShake(const HITLS_Ctx *ctx, uint8_t *isBefore)
Check whether the handshake has not been performed.
int32_t HITLS_GetShutdownState(const HITLS_Ctx *ctx, uint32_t *mode)
Obtain the shutdown status of the TLS link.
int32_t HITLS_GetMaxProtoVersion(const HITLS_Ctx *ctx, uint16_t *maxVersion)
Obtain the latest protocol version.
int32_t HITLS_GetCipherServerPreference(const HITLS_Ctx *ctx, bool *isSupport)
Obtains whether the current cipher suite supports preferential selection from the list of algorithms ...
int32_t HITLS_SetEcPointFormats(HITLS_Ctx *ctx, const uint8_t *pointFormats, uint32_t pointFormatsSize)
Set the EC point format of the hitls.
int32_t HITLS_IsHandShakeDone(const HITLS_Ctx *ctx, uint8_t *isDone)
Obtain the information about whether the handshake is complete.
int32_t HITLS_GetSecureRenegotiationSupport(const HITLS_Ctx *ctx, uint8_t *isSecureRenegotiation)
Obtains whether security renegotiation is supported.
int32_t HITLS_GetLocalSignScheme(const HITLS_Ctx *ctx, HITLS_SignHashAlgo *localSignScheme)
Obtain the signature hash algorithm used by the local end.
int32_t HITLS_GetAllAsyncFds(HITLS_Ctx *ctx, int *fd, int *fdNums)
Obtains all asynchronous fd.
int32_t HITLS_SetVersion(HITLS_Ctx *ctx, uint32_t minVersion, uint32_t maxVersion)
Set the supported version number range.
int32_t HITLS_IsAead(const HITLS_Ctx *ctx, uint8_t *isAead)
Obtain whether to use the AEAD algorithm.
int32_t HITLS_Read(HITLS_Ctx *ctx, uint8_t *data, uint32_t bufSize, uint32_t *readLen)
Read application data
uint32_t HITLS_GetReadPendingBytes(const HITLS_Ctx *ctx)
Obtain the number of bytes of application data to be read from the current record from the HiTLS obje...
int32_t HITLS_SetUserData(HITLS_Ctx *ctx, void *userData)
Save the user data in the HiTLS context, which can be obtained from the callback registered with the ...
int32_t HITLS_SetMaxProtoVersion(HITLS_Ctx *ctx, uint16_t version)
Set the maximum protocol version that is supported based on the specified version.
int32_t HITLS_SetRecordPaddingCb(HITLS_Ctx *ctx, HITLS_RecordPaddingCb callback)
Sets the RecordPadding callback.
const HITLS_Cipher * HITLS_GetCurrentCipher(const HITLS_Ctx *ctx)
Obtain the negotiated cipher suite pointer.
int32_t HITLS_DoHandShake(HITLS_Ctx *ctx)
The client/server starts handshake.
int32_t HITLS_GetRenegotiationState(const HITLS_Ctx *ctx, uint8_t *isRenegotiationState)
Obtain the current is whether in the renegotiation state.
int32_t HITLS_SetEndPoint(HITLS_Ctx *ctx, bool isClient)
Set the initial status of the connection.
int32_t HITLS_ReadHasPending(const HITLS_Ctx *ctx, uint8_t *isPending)
Check the HiTLS object in the read cache.
int32_t HITLS_GetPeerFinishVerifyData(const HITLS_Ctx *ctx, void *buf, uint32_t bufLen, uint32_t *dataLen)
Obtain the verification data and length of the peer end based on the received finished message.
int32_t HITLS_GetClientOnceVerifySupport(HITLS_Ctx *ctx, uint8_t *isSupport)
Query whether the client certificate can be requested only once.
int32_t HITLS_SetVersionForbid(HITLS_Ctx *ctx, uint32_t noVersion)
Set the version number to be disabled.
int32_t HITLS_SetSigalgsList(HITLS_Ctx *ctx, const uint16_t *signAlgs, uint16_t signAlgsSize)
Set the signature algorithm supported by the hitls object.
int32_t HITLS_Write(HITLS_Ctx *ctx, const uint8_t *data, uint32_t dataLen)
Write data.
int32_t HITLS_Accept(HITLS_Ctx *ctx)
The server waits for the client to start handshake.
int32_t HITLS_GetSharedGroup(const HITLS_Ctx *ctx, int32_t nmatch, uint16_t *groupId)
Obtain the supported peer group or the number of supported peer groups of the nth match.
int32_t HITLS_GetMaxCertList(const HITLS_Ctx *ctx, uint32_t *maxSize)
Obtains the maximum size of the certificate chain that can be sent by the peer end.
int32_t HITLS_GetPeerSignScheme(const HITLS_Ctx *ctx, HITLS_SignHashAlgo *peerSignScheme)
Obtain the signature hash algorithm used by the peer end.
HITLS_RecordPaddingCb HITLS_GetRecordPaddingCb(HITLS_Ctx *ctx)
Obtains the RecordPadding callback function.
int32_t HITLS_SetCipherServerPreference(HITLS_Ctx *ctx, bool isSupport)
The algorithm suite can be preferentially selected from the algorithm list supported by the server.
HITLS_Ctx * HITLS_New(HITLS_Config *config)
Create a TLS object and deep copy the HITLS_Config to the HITLS_Ctx.
int32_t HITLS_SetMaxCertList(HITLS_Ctx *ctx, uint32_t maxSize)
Sets the maximum size of the certificate chain that can be sent from the peer end.
int32_t HITLS_GetQuietShutdown(const HITLS_Ctx *ctx, int32_t *mode)
Obtain the current silent disconnection mode.
int32_t HITLS_GetRandom(const HITLS_Ctx *ctx, uint8_t *out, uint32_t *outlen, bool isClient)
Obtain the random number of the client and server during the handshake.
int32_t HITLS_IsClient(const HITLS_Ctx *ctx, bool *isClient)
Check whether the current end is client.
int32_t HITLS_SetFlightTransmitSwitch(HITLS_Ctx *ctx, uint8_t isEnable)
Sets whether to send handshake messages by flight distance.
HITLS_SignHashAlgo
Certificate Signature Algorithm Enumeration
Definition hitls_cert_type.h:149
struct TlsCtx HITLS_Ctx
HITLS context
Definition hitls_type.h:28
struct TlsConfig HITLS_Config
config context
Definition hitls_type.h:34
struct TlsCipherSuiteInfo HITLS_Cipher
cipherSuite information
Definition hitls_type.h:40