20#include "hitls_type.h"
21#include "hitls_cert_type.h"
22#include "cipher_suite.h"
30#define TLS_DEFAULT_VERIFY_DEPTH 20u
32#define MAX_PASS_LEN 256
35#define CERT_LEN_TAG_SIZE 3u
49 HITLS_SignAlgo signAlgo;
50 HITLS_HashAlgo hashAlgo;
72bool SAL_CERT_IsSignAlgorithmAllowed(
const TLS_Ctx *ctx, uint16_t signScheme,
73 const uint16_t *allowList, uint32_t allowListSize);
101int32_t SAL_CERT_ParseCertChain(
HITLS_Ctx *ctx, CERT_Item *item,
CERT_Pair **certPair);
117int32_t SAL_CERT_VerifyCertChain(
HITLS_Ctx *ctx,
CERT_Pair *certPair,
bool isTlcpEncCert);
169 uint8_t *out, uint32_t *outLen);
185 uint8_t *out, uint32_t *outLen);
uint8_t * SAL_CERT_ClntGmEncodeEncCert(HITLS_Ctx *ctx, CERT_Pair *peerCert, uint32_t *useLen)
The client obtains the encoded content of the TLCP encryption certificate.
int32_t SAL_CERT_CheckKeySecbits(HITLS_Ctx *ctx, HITLS_CERT_X509 *cert, HITLS_CERT_Key *key)
Check the secbits of key
int32_t SAL_CERT_KeyDecrypt(HITLS_Ctx *ctx, HITLS_CERT_Key *key, const uint8_t *in, uint32_t inLen, uint8_t *out, uint32_t *outLen)
Use the certificate private key to decrypt, which is used for the RSA cipher suite.
int32_t SAL_CERT_KeyEncrypt(HITLS_Ctx *ctx, HITLS_CERT_Key *key, const uint8_t *in, uint32_t inLen, uint8_t *out, uint32_t *outLen)
Encrypted by the certificate public key, which is used for the RSA cipher suite.
bool SAL_CERT_CheckCertKeyUsage(HITLS_Ctx *ctx, HITLS_CERT_X509 *cert, HITLS_CERT_CtrlCmd keyusage)
Check whether the certificate is an encrypted certificate, a digital signature, or a permission to is...
uint8_t * SAL_CERT_SrvrGmEncodeEncCert(HITLS_Ctx *ctx, uint32_t *useLen)
Encoded content of the TLCP encryption certificate obtained by the server.
void HITLS_CERT_Key
Describes the certificate key
定义 hitls_cert_type.h:49
HITLS_CERT_CtrlCmd
ctrl option
定义 hitls_cert_type.h:85
HITLS_SignHashAlgo
Certificate Signature Algorithm Enumeration
定义 hitls_cert_type.h:177
void HITLS_CERT_X509
Describes the x509 certificate
定义 hitls_cert_type.h:37
HITLS_CERT_KeyType
Certificate Public Key Type
定义 hitls_cert_type.h:162
struct TlsCtx HITLS_Ctx
HITLS context
定义 hitls_type.h:35
struct TlsConfig HITLS_Config
config context
定义 hitls_type.h:41
used to transfer the signature parameter
定义 cert.h:48