26#include "hitls_type.h"
36#define HITLS_ALPN_ERR_OK 0
37#define HITLS_ALPN_ERR_ALERT_WARNING 1
38#define HITLS_ALPN_ERR_ALERT_FATAL 2
39#define HITLS_ALPN_ERR_NOACK 3
58 uint8_t *clientAlpnList, uint32_t clientAlpnListSize,
void *userData);
127 const uint8_t *clientAlpnList, uint32_t clientAlpnListLen);
int32_t HITLS_GetSelectedAlpnProto(HITLS_Ctx *ctx, uint8_t **proto, uint32_t *protoLen)
Obtaining the ALPN Negotiation Result
int32_t HITLS_SetAlpnProtos(HITLS_Ctx *ctx, const uint8_t *protos, uint32_t protosLen)
Sets the client ALPN list, which is used to negotiate the application layer protocol with the server ...
int32_t HITLS_SelectAlpnProtocol(uint8_t **out, uint8_t *outLen, const uint8_t *servAlpnList, uint32_t servAlpnListLen, const uint8_t *clientAlpnList, uint32_t clientAlpnListLen)
Obtaining the ALPN Negotiation Result The server selects an appropriate ALPN based on the ALPN provid...
int32_t(* HITLS_AlpnSelectCb)(HITLS_Ctx *ctx, uint8_t **selectedProto, uint8_t *selectedProtoSize, uint8_t *clientAlpnList, uint32_t clientAlpnListSize, void *userData)
Callback prototype for selecting the ALPN protocol on the server, which is used to select the applica...
定义 hitls_alpn.h:57
int32_t HITLS_CFG_SetAlpnProtos(HITLS_Config *config, const uint8_t *alpnProtos, uint32_t alpnProtosLen)
Sets the ALPN list on the client, which is used to negotiate the application layer protocol with the ...
int32_t HITLS_CFG_SetAlpnProtosSelectCb(HITLS_Config *config, HITLS_AlpnSelectCb callback, void *userData)
Sets the ALPN selection callback on the server. The callback is used to select the application layer ...
struct TlsCtx HITLS_Ctx
HITLS context
定义 hitls_type.h:35
struct TlsConfig HITLS_Config
config context
定义 hitls_type.h:41