API参考
载入中...
搜索中...
未找到
hs_cert.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 RECV_COMMON_H
17#define RECV_COMMON_H
18
19#include <stdint.h>
20#include "tls.h"
21#include "cipher_suite.h"
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27/* Information used to describe the expected certificate */
28typedef struct {
29 /* The server must select the certificate matching the cipher suite. The client has no such restriction. */
30 CERT_Type certType;
31 uint16_t *signSchemeList; /* certificate signature algorithm list */
32 uint32_t signSchemeNum; /* number of certificate signature algorithms */
33 uint16_t *ellipticCurveList; /* EC curve ID list */
34 uint32_t ellipticCurveNum; /* number of EC curve IDs */
35 uint8_t *ecPointFormatList; /* EC point format list */
36 uint32_t ecPointFormatNum; /* number of EC point formats */
37 HITLS_TrustedCAList *caList; /* trusted CA list */
39
58int32_t HS_CheckCertInfo(HITLS_Ctx *ctx, const CERT_ExpectInfo *expectCertInfo, HITLS_CERT_X509 *cert,
59 bool isNegotiateSignAlgo, bool signCheck);
60
71int32_t HS_SelectCertByInfo(HITLS_Ctx *ctx, CERT_ExpectInfo *info);
72
73CERT_Type CertKeyType2CertType(HITLS_CERT_KeyType keyType);
74
75#ifdef __cplusplus
76}
77#endif
78
79#endif
void HITLS_CERT_X509
Describes the x509 certificate
定义 hitls_cert_type.h:37
struct BslList HITLS_TrustedCAList
Describes the list of trusted CAs
定义 hitls_cert_type.h:67
HITLS_CERT_KeyType
Certificate Public Key Type
定义 hitls_cert_type.h:162
struct TlsCtx HITLS_Ctx
HITLS context
定义 hitls_type.h:35
定义 hs_cert.h:28