16#ifndef HITLS_APP_TLS_COMMON_H
17#define HITLS_APP_TLS_COMMON_H
23#include "hitls_config.h"
24#include "hitls_pki_cert.h"
26#include "hitls_cert.h"
27#include "crypt_eal_pkey.h"
28#include "app_provider.h"
35#define APP_HEARTBEAT_LEN 17
36#define DEFAULT_DTLCP_PORT 54000
37#define HTTP_BUF_MAXLEN (18 * 1024)
57 BSL_ParseFormat certFormat;
58 BSL_ParseFormat keyFormat;
66#ifdef HITLS_APP_SM_MODE
67 HITLS_APP_SM_Param *smParam;
76APP_ProtocolType ParseProtocolType(
const char *protocolStr);
92int ConfigureCipherSuites(
HITLS_Config *config,
const char *cipherStr, APP_ProtocolType protocol);
101HITLS_X509_Cert *LoadCertFromFile(
const char *certFile, BSL_ParseFormat format,
AppProvider *provider);
113 bool verifyPeer,
int verifyDepth);
160int AcceptTCPConnection(
int listenFd);
167void PrintConnectionInfo(
HITLS_Ctx *ctx,
bool showState);
173void PrintCertificateChain(
HITLS_Ctx *ctx);
189int32_t GetHeartBeat(uint8_t *buffer, uint32_t *len);
191int32_t ParseHeartBeat(uint8_t *buffer, uint32_t len);
struct TlsCtx HITLS_Ctx
HITLS context
定义 hitls_type.h:35
struct TlsConfig HITLS_Config
config context
定义 hitls_type.h:41