API参考
载入中...
搜索中...
未找到
hitls_pki_cms.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
20
26
27#ifndef HITLS_PKI_CMS_H
28#define HITLS_PKI_CMS_H
29
30#include "hitls_pki_types.h"
31#include "bsl_params.h"
32#include "hitls_pki_cert.h"
33#include "crypt_eal_pkey.h"
34
35#ifdef __cplusplus
36extern "C" {
37#endif
38
39typedef struct _HITLS_CMS HITLS_CMS;
40
49HITLS_CMS *HITLS_CMS_ProviderNew(HITLS_PKI_LibCtx *libCtx, const char *attrName, int32_t dataType);
50
56void HITLS_CMS_Free(HITLS_CMS *cms);
57
72int32_t HITLS_CMS_ProviderParseBuff(HITLS_PKI_LibCtx *libCtx, const char *attrName, const BSL_Param *param,
73 const BSL_Buffer *encode, HITLS_CMS **cms);
74
89int32_t HITLS_CMS_ProviderParseFile(HITLS_PKI_LibCtx *libCtx, const char *attrName, const BSL_Param *param,
90 const char *path, HITLS_CMS **cms);
91
110int32_t HITLS_CMS_DataSign(HITLS_CMS *cms, CRYPT_EAL_PkeyCtx *prvKey, HITLS_X509_Cert *cert, BSL_Buffer *msg,
111 const BSL_Param *optionalParam);
112
127int32_t HITLS_CMS_DataVerify(HITLS_CMS *cms, BSL_Buffer *msg, const BSL_Param *inputParam, BSL_Buffer *output);
128
143int32_t HITLS_CMS_DataInit(int32_t option, HITLS_CMS *cms, const BSL_Param *param);
144
159int32_t HITLS_CMS_DataUpdate(HITLS_CMS *cms, const BSL_Buffer *input);
160
180int32_t HITLS_CMS_DataFinal(HITLS_CMS *cms, const BSL_Param *param);
181
195int32_t HITLS_CMS_Ctrl(HITLS_CMS *cms, int32_t cmd, void *val, uint32_t valLen);
196
197#ifdef __cplusplus
198}
199#endif
200
201#endif // HITLS_PKI_CMS_H
int32_t HITLS_CMS_ProviderParseBuff(HITLS_PKI_LibCtx *libCtx, const char *attrName, const BSL_Param *param, const BSL_Buffer *encode, HITLS_CMS **cms)
cms parse
void HITLS_CMS_Free(HITLS_CMS *cms)
Free CMS structure
HITLS_CMS * HITLS_CMS_ProviderNew(HITLS_PKI_LibCtx *libCtx, const char *attrName, int32_t dataType)
Create a new CMS handle
int32_t HITLS_CMS_DataInit(int32_t option, HITLS_CMS *cms, const BSL_Param *param)
Initialize streaming operation for CMS SignedData (unified interface)
int32_t HITLS_CMS_DataSign(HITLS_CMS *cms, CRYPT_EAL_PkeyCtx *prvKey, HITLS_X509_Cert *cert, BSL_Buffer *msg, const BSL_Param *optionalParam)
Create signer information and optionally perform one-shot signing.
int32_t HITLS_CMS_Ctrl(HITLS_CMS *cms, int32_t cmd, void *val, uint32_t valLen)
Control and modify CMS auxiliary data (certificates, CRLs, etc.)
int32_t HITLS_CMS_DataUpdate(HITLS_CMS *cms, const BSL_Buffer *input)
Update streaming operation with input data chunk (unified interface)
int32_t HITLS_CMS_DataFinal(HITLS_CMS *cms, const BSL_Param *param)
Finalize streaming operation (unified interface)
int32_t HITLS_CMS_DataVerify(HITLS_CMS *cms, BSL_Buffer *msg, const BSL_Param *inputParam, BSL_Buffer *output)
Verify CMS SignedData signatures
int32_t HITLS_CMS_ProviderParseFile(HITLS_PKI_LibCtx *libCtx, const char *attrName, const BSL_Param *param, const char *path, HITLS_CMS **cms)
cms parse file
struct EAL_PkeyCtx CRYPT_EAL_PkeyCtx
定义 crypt_eal_pkey.h:108
定义 bsl_types.h:40