• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2024 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *    http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef CJ_CERT_COMMON_H
17 #define CJ_CERT_COMMON_H
18 
19 #include "x509_certificate.h"
20 
21 typedef struct CjX509CertMatchParams CjX509CertMatchParams;
22 
23 struct CjX509CertMatchParams {
24     HcfX509Certificate *x509Cert;
25     CfBlob *validDate;
26     CfBlob *issuer;
27     CfBlob *keyUsage;
28     CfBlob *serialNumber;
29     CfBlob *subject;
30     CfBlob *publicKey;
31     CfBlob *publicKeyAlgID;
32     SubjectAlternaiveNameData *subjectAlternativeNames;
33     uint32_t subjectAlternativeNameCnt;
34     bool matchAllSubjectAltNames;
35     CfBlob *authorityKeyIdentifier;
36     int32_t minPathLenConstraint;
37     CfArray *extendedKeyUsage;
38     CfBlob *nameConstraints;
39     CfArray *certPolicy;
40     CfBlob *privateKeyValid;
41     CfBlob *subjectKeyIdentifier;
42 };
43 
44 struct CjX509CrlMatchParams {
45     CfBlobArray *issuer;
46     HcfX509Certificate *x509Cert;
47     CfBlob *updateDateTime;
48     CfBlob *maxCRL;
49     CfBlob *minCRL;
50 };
51 
52 typedef struct HcfPubKey HcfPubKey;
53 struct HcfPubKey {
54 };
55 
56 extern "C" void FfiCertDestroy(void *obj);
57 
58 #endif //CJ_CERT_COMMON_H
59