API参考
载入中...
搜索中...
未找到
hitls_pki_crl.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 HITLS_PKI_CRL_H
17#define HITLS_PKI_CRL_H
18
19#include "hitls_pki_types.h"
20#include "crypt_eal_pkey.h"
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26typedef struct _HITLS_X509_Crl HITLS_X509_Crl;
27
28typedef struct _HITLS_X509_CrlEntry HITLS_X509_CrlEntry;
29
36HITLS_X509_Crl *HITLS_X509_CrlNew(void);
46void HITLS_X509_CrlFree(HITLS_X509_Crl *crl);
47
62int32_t HITLS_X509_CrlCtrl(HITLS_X509_Crl *crl, int32_t cmd, void *val, uint32_t valLen);
63
81int32_t HITLS_X509_CrlParseBuff(int32_t format, const BSL_Buffer *encode, HITLS_X509_Crl **crl);
82
100int32_t HITLS_X509_CrlParseBundleBuff(int32_t format, const BSL_Buffer *encode, HITLS_X509_List **crlList);
101
116int32_t HITLS_X509_CrlParseFile(int32_t format, const char *path, HITLS_X509_Crl **crl);
117
133int32_t HITLS_X509_CrlParseBundleFile(int32_t format, const char *path, HITLS_X509_List **crlList);
134
150int32_t HITLS_X509_CrlGenBuff(int32_t format, HITLS_X509_Crl *crl, BSL_Buffer *buff);
151
167int32_t HITLS_X509_CrlGenFile(int32_t format, HITLS_X509_Crl *crl, const char *path);
168
181int32_t HITLS_X509_CrlVerify(void *pubkey, const HITLS_X509_Crl *crl);
182
198int32_t HITLS_X509_CrlSign(int32_t mdId, const CRYPT_EAL_PkeyCtx *prvKey, const HITLS_X509_SignAlgParam *algParam,
199 HITLS_X509_Crl *crl);
200
208HITLS_X509_CrlEntry *HITLS_X509_CrlEntryNew(void);
209
219void HITLS_X509_CrlEntryFree(HITLS_X509_CrlEntry *entry);
220
232int32_t HITLS_X509_CrlEntryCtrl(HITLS_X509_CrlEntry *revoked, int32_t cmd, void *val, uint32_t valLen);
233
234#ifdef __cplusplus
235}
236#endif
237
238#endif // HITLS_PKI_CRL_H
struct EAL_PkeyCtx CRYPT_EAL_PkeyCtx
定义 crypt_eal_pkey.h:108
int32_t HITLS_X509_CrlEntryCtrl(HITLS_X509_CrlEntry *revoked, int32_t cmd, void *val, uint32_t valLen)
Control interface for CRL entry.
int32_t HITLS_X509_CrlParseFile(int32_t format, const char *path, HITLS_X509_Crl **crl)
Parse the CRL in the file.
void HITLS_X509_CrlEntryFree(HITLS_X509_CrlEntry *entry)
Release the CRL certificateRevoke struct .
int32_t HITLS_X509_CrlParseBundleFile(int32_t format, const char *path, HITLS_X509_List **crlList)
Parse the CRLs in the file.
int32_t HITLS_X509_CrlSign(int32_t mdId, const CRYPT_EAL_PkeyCtx *prvKey, const HITLS_X509_SignAlgParam *algParam, HITLS_X509_Crl *crl)
Signing a CRL.
int32_t HITLS_X509_CrlVerify(void *pubkey, const HITLS_X509_Crl *crl)
Verify the integrity of the CRL.
HITLS_X509_CrlEntry * HITLS_X509_CrlEntryNew(void)
Allocate a revoked certificate.
void HITLS_X509_CrlFree(HITLS_X509_Crl *crl)
Release the CRL.
int32_t HITLS_X509_CrlParseBuff(int32_t format, const BSL_Buffer *encode, HITLS_X509_Crl **crl)
Parse the CRL in the buffer.
int32_t HITLS_X509_CrlGenFile(int32_t format, HITLS_X509_Crl *crl, const char *path)
Generate a CRL and encode it to specific file.
int32_t HITLS_X509_CrlCtrl(HITLS_X509_Crl *crl, int32_t cmd, void *val, uint32_t valLen)
Crl setting interface.
int32_t HITLS_X509_CrlParseBundleBuff(int32_t format, const BSL_Buffer *encode, HITLS_X509_List **crlList)
Parse multiple CRLs from a buffer.
HITLS_X509_Crl * HITLS_X509_CrlNew(void)
Allocate a crl.
int32_t HITLS_X509_CrlGenBuff(int32_t format, HITLS_X509_Crl *crl, BSL_Buffer *buff)
Generate a CRL and encode it.
定义 bsl_types.h:40
Signature algorithm parameters.
定义 hitls_pki_types.h:215