API参考
载入中...
搜索中...
未找到
pack_common.h
1/*
2 * This file is part of the openHiTLS project.
3 *
4 * openHiTLS is licensed under the Mulan PSL v2.
5 * You can use this software according to the terms and conditions of the Mulan PSL v2.
6 * You may obtain a copy of Mulan PSL v2 at:
7 *
8 * http://license.coscl.org.cn/MulanPSL2
9 *
10 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
11 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
12 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
13 * See the Mulan PSL v2 for more details.
14 */
15
16#ifndef PACK_COMMON_H
17#define PACK_COMMON_H
18
19#include <stdint.h>
20#include "tls.h"
21#include "pack.h"
22#include "hs_msg.h"
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
40int32_t PackSessionId(PackPacket *pkt, const uint8_t *id, uint32_t idSize);
41
50void PackDtlsMsgHeader(HS_MsgType type, uint16_t sequence, uint32_t length, uint8_t *buf);
51
52int32_t PackTrustedCAList(HITLS_TrustedCAList *caList, PackPacket *pkt);
53
54int32_t PackCertificateReqCtx(const TLS_Ctx *ctx, PackPacket *pkt);
55
56int32_t PackHelloCommonField(const TLS_Ctx *ctx, PackPacket *pkt, uint16_t version, bool isClient);
57#ifdef __cplusplus
58}
59#endif /* end __cplusplus */
60
61#endif /* end PACK_COMMON_H */
struct BslList HITLS_TrustedCAList
Describes the list of trusted CAs
定义 hitls_cert_type.h:67
定义 tls.h:325