OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
DER_CertCrl.h
Go to the documentation of this file.
1/* Copyright (c) 2005-2009 Apple Inc. All Rights Reserved. */
2
3/*
4 * DER_CertCrl.h - support for decoding X509 certificates and CRLs
5 *
6 * Created Nov. 4 2005 by dmitch
7 */
8
9#ifndef _DER_CERT_CRL_H_
10#define _DER_CERT_CRL_H_
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16#include "libDER.h"
17#include "DER_Decode.h"
18
19/*
20 * Top level cert or CRL - the two are identical at this level - three
21 * components. The tbs field is saved in full DER form for sig verify.
22 */
23typedef struct {
24 DERItem tbs; /* sequence, DERTBSCert, DER_DEC_SAVE_DER */
25 DERItem sigAlg; /* sequence, DERAlgorithmId */
26 DERItem sig; /* bit string */
28
29/* DERItemSpecs to decode into a DERSignedCertCrl */
32
33/* TBS cert components */
34typedef struct {
35 DERItem version; /* integer, optional, EXPLICIT */
36 DERItem serialNum; /* integer */
37 DERItem tbsSigAlg; /* sequence, DERAlgorithmId */
38 DERItem issuer; /* sequence, TBD */
39 DERItem validity; /* sequence, DERValidity */
40 DERItem subject; /* sequence, TBD */
41 DERItem subjectPubKey; /* sequence, DERSubjPubKeyInfo */
42 DERItem issuerID; /* bit string, optional */
43 DERItem subjectID; /* bit string, optional */
44 DERItem extensions; /* sequence, optional, EXPLICIT */
46
47/* DERItemSpecs to decode into a DERTBSCert */
48extern const DERItemSpec DERTBSCertItemSpecs[];
50
51/*
52 * validity - components can be either UTC or generalized time.
53 * Both are ASN_ANY with DER_DEC_SAVE_DER.
54 */
59
60/* DERItemSpecs to decode into a DERValidity */
63
64/* AttributeTypeAndValue components. */
69
70/* DERItemSpecs to decode into DERAttributeTypeAndValue */
73
74/* Extension components */
80
81/* DERItemSpecs to decode into DERExtension */
84
85/* BasicConstraints components. */
90
91/* DERItemSpecs to decode into DERBasicConstraints */
94
95/* PrivateKeyUsagePeriod components. */
100
101/* DERItemSpecs to decode into a DERPrivateKeyUsagePeriod */
104
105/* DistributionPoint components. */
111
112/* DERItemSpecs to decode into a DERDistributionPoint */
115
116/* PolicyInformation components. */
121
122/* DERItemSpecs to decode into a DERPolicyInformation */
125
126/* PolicyQualifierInfo components. */
131
132/* DERItemSpecs to decode into a DERPolicyQualifierInfo */
135
136/* UserNotice components. */
141
142/* DERItemSpecs to decode into a DERUserNotice */
145
146/* NoticeReference components. */
151
152/* DERItemSpecs to decode into a DERNoticeReference */
155
156/* PolicyMapping components. */
161
162/* DERItemSpecs to decode into a DERPolicyMapping */
165
166/* AccessDescription components. */
171
172/* DERItemSpecs to decode into a DERAccessDescription */
175
176/* AuthorityKeyIdentifier components. */
182
183/* DERItemSpecs to decode into a DERAuthorityKeyIdentifier */
186
187/* OtherName components. */
192
193/* DERItemSpecs to decode into a DEROtherName */
196
197/* PolicyConstraints components. */
202
203/* DERItemSpecs to decode into a DERPolicyConstraints */
206
207/* TBS CRL */
208typedef struct {
209 DERItem version; /* integer, optional */
210 DERItem tbsSigAlg; /* sequence, DERAlgorithmId */
211 DERItem issuer; /* sequence, TBD */
212 DERItem thisUpdate; /* ASN_ANY, SAVE_DER */
213 DERItem nextUpdate; /* ASN_ANY, SAVE_DER */
214 DERItem revokedCerts; /* sequence of DERRevokedCert, optional */
215 DERItem extensions; /* sequence, optional, EXPLICIT */
216} DERTBSCrl;
217
218/* DERItemSpecs to decode into a DERTBSCrl */
219extern const DERItemSpec DERTBSCrlItemSpecs[];
221
222typedef struct {
223 DERItem serialNum; /* integer */
224 DERItem revocationDate; /* time - ASN_ANY, SAVE_DER */
225 DERItem extensions; /* sequence, optional, EXPLICIT */
227
228/* DERItemSpecs to decode into a DERRevokedCert */
231
232#ifdef __cplusplus
233}
234#endif
235
236#endif /* _DER_CERT_CRL_H_ */
237
const DERShort DERNumTBSCrlItemSpecs
const DERShort DERNumPolicyInformationItemSpecs
const DERShort DERNumPolicyQualifierInfoItemSpecs
const DERItemSpec DERAccessDescriptionItemSpecs[]
const DERItemSpec DERTBSCertItemSpecs[]
Definition DER_CertCrl.c:35
const DERShort DERNumDistributionPointItemSpecs
const DERItemSpec DERPolicyQualifierInfoItemSpecs[]
const DERShort DERNumOtherNameItemSpecs
const DERItemSpec DERRevokedCertItemSpecs[]
const DERShort DERNumBasicConstraintsItemSpecs
const DERItemSpec DERBasicConstraintsItemSpecs[]
const DERShort DERNumUserNoticeItemSpecs
const DERItemSpec DERAttributeTypeAndValueItemSpecs[]
Definition DER_CertCrl.c:87
const DERShort DERNumSignedCertCrlItemSpecs
Definition DER_CertCrl.c:31
const DERShort DERNumAttributeTypeAndValueItemSpecs
Definition DER_CertCrl.c:96
const DERShort DERNumValidityItemSpecs
Definition DER_CertCrl.c:83
const DERShort DERNumPolicyMappingItemSpecs
const DERItemSpec DERPolicyMappingItemSpecs[]
const DERShort DERNumTBSCertItemSpecs
Definition DER_CertCrl.c:71
const DERItemSpec DERNoticeReferenceItemSpecs[]
const DERShort DERNumAuthorityKeyIdentifierItemSpecs
const DERShort DERNumExtensionItemSpecs
const DERItemSpec DEROtherNameItemSpecs[]
const DERItemSpec DERDistributionPointItemSpecs[]
const DERItemSpec DERExtensionItemSpecs[]
const DERShort DERNumPolicyConstraintsItemSpecs
const DERItemSpec DERPolicyConstraintsItemSpecs[]
const DERShort DERNumRevokedCertItemSpecs
const DERShort DERNumNoticeReferenceItemSpecs
const DERItemSpec DERUserNoticeItemSpecs[]
const DERShort DERNumPrivateKeyUsagePeriodItemSpecs
const DERItemSpec DERSignedCertCrlItemSpecs[]
Definition DER_CertCrl.c:18
const DERItemSpec DERAuthorityKeyIdentifierItemSpecs[]
const DERItemSpec DERTBSCrlItemSpecs[]
const DERItemSpec DERValidityItemSpecs[]
Definition DER_CertCrl.c:74
const DERItemSpec DERPrivateKeyUsagePeriodItemSpecs[]
const DERItemSpec DERPolicyInformationItemSpecs[]
const DERShort DERNumAccessDescriptionItemSpecs
uint16_t DERShort
DERItem pathLenConstraint
Definition DER_CertCrl.h:88
DERItem extnID
Definition DER_CertCrl.h:76
DERItem critical
Definition DER_CertCrl.h:77
DERItem extnValue
Definition DER_CertCrl.h:78
DERItem value
DERItem typeIdentifier
DERItem requireExplicitPolicy
DERItem issuerDomainPolicy
DERItem subjectDomainPolicy
DERItem serialNum
DERItem extensions
DERItem revocationDate
DERItem subjectPubKey
Definition DER_CertCrl.h:41
DERItem version
Definition DER_CertCrl.h:35
DERItem subjectID
Definition DER_CertCrl.h:43
DERItem serialNum
Definition DER_CertCrl.h:36
DERItem validity
Definition DER_CertCrl.h:39
DERItem subject
Definition DER_CertCrl.h:40
DERItem issuerID
Definition DER_CertCrl.h:42
DERItem tbsSigAlg
Definition DER_CertCrl.h:37
DERItem extensions
Definition DER_CertCrl.h:44
DERItem issuer
Definition DER_CertCrl.h:38
DERItem issuer
DERItem thisUpdate
DERItem version
DERItem revokedCerts
DERItem extensions
DERItem tbsSigAlg
DERItem nextUpdate
DERItem noticeRef
DERItem explicitText
DERItem notAfter
Definition DER_CertCrl.h:57
DERItem notBefore
Definition DER_CertCrl.h:56