API参考
载入中...
搜索中...
未找到
hs_verify.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 HS_VERIFY_H
17#define HS_VERIFY_H
18
19#include <stdint.h>
20#include <stdbool.h>
21#include "hitls_crypt_type.h"
22#include "tls.h"
23#include "hs_ctx.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
38int32_t VERIFY_Init(HS_Ctx *hsCtx);
39
45void VERIFY_Deinit(HS_Ctx *hsCtx);
46
62int32_t VERIFY_CalcVerifyData(TLS_Ctx *ctx, bool isClient, const uint8_t *masterSecret, uint32_t masterSecretLen);
63
74int32_t VERIFY_CalcSignData(TLS_Ctx *ctx, HITLS_CERT_Key *privateKey, HITLS_SignHashAlgo signScheme);
75
88int32_t VERIFY_VerifySignData(TLS_Ctx *ctx, HITLS_CERT_Key *pubkey, HITLS_SignHashAlgo signScheme,
89 const uint8_t *signData, uint16_t signDataLen);
90
101int32_t VERIFY_GetVerifyData(const VerifyCtx *ctx, uint8_t *verifyData, uint32_t *verifyDataLen);
102
115int32_t VERIFY_Tls13CalcVerifyData(TLS_Ctx *ctx, bool isClient);
116
125int32_t VERIFY_HelloRetryRequestVerifyProcess(TLS_Ctx *ctx);
126
127int32_t VERIFY_CalcPskBinder(const TLS_Ctx *ctx, HITLS_HashAlgo hashAlgo, bool isExternalPsk, uint8_t *psk,
128 uint32_t pskLen, const uint8_t *msg, uint32_t msgLen, uint8_t *binder, uint32_t binderLen);
129
130#ifdef __cplusplus
131}
132#endif /* end __cplusplus */
133#endif /* end HS_VERIFY_H */
void HITLS_CERT_Key
Describes the certificate key
定义 hitls_cert_type.h:49
HITLS_SignHashAlgo
Certificate Signature Algorithm Enumeration
定义 hitls_cert_type.h:177
定义 hs_ctx.h:143