VirtualBox

source: vbox/trunk/src/VBox/Runtime/common/crypto/x509-template.h@ 52521

Last change on this file since 52521 was 52521, checked in by vboxsync, 10 years ago

x509-template.h: Parameters are completely optional if timestamp counter signatures on windows are anything to go by.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 18.3 KB
Line 
1/* $Id: x509-template.h 52521 2014-08-29 06:10:31Z vboxsync $ */
2/** @file
3 * IPRT - Crypto - X.509, Code Generator Template.
4 */
5
6/*
7 * Copyright (C) 2006-2014 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 *
17 * The contents of this file may alternatively be used under the terms
18 * of the Common Development and Distribution License Version 1.0
19 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
20 * VirtualBox OSE distribution, in which case the provisions of the
21 * CDDL are applicable instead of those of the GPL.
22 *
23 * You may elect to license modified versions of this file under the
24 * terms and conditions of either the GPL or the CDDL or both.
25 */
26
27#define RTASN1TMPL_DECL RTDECL
28
29/*
30 * X.509 Validity.
31 */
32#define RTASN1TMPL_TYPE RTCRX509VALIDITY
33#define RTASN1TMPL_EXT_NAME RTCrX509Validity
34#define RTASN1TMPL_INT_NAME rtCrX509Validity
35RTASN1TMPL_BEGIN_SEQCORE();
36RTASN1TMPL_MEMBER( NotBefore, RTASN1TIME, RTAsn1Time);
37RTASN1TMPL_MEMBER( NotAfter, RTASN1TIME, RTAsn1Time);
38RTASN1TMPL_EXEC_CHECK_SANITY( rc = rtCrX509Validity_CheckSanityExtra(pThis, fFlags, pErrInfo, pszErrorTag) )
39RTASN1TMPL_END_SEQCORE();
40#undef RTASN1TMPL_TYPE
41#undef RTASN1TMPL_EXT_NAME
42#undef RTASN1TMPL_INT_NAME
43
44
45/*
46 * One X.509 Algorithm Identifier.
47 */
48#define RTASN1TMPL_TYPE RTCRX509ALGORITHMIDENTIFIER
49#define RTASN1TMPL_EXT_NAME RTCrX509AlgorithmIdentifier
50#define RTASN1TMPL_INT_NAME rtCrX509AlgorithmIdentifier
51RTASN1TMPL_BEGIN_SEQCORE();
52RTASN1TMPL_MEMBER( Algorithm, RTASN1OBJID, RTAsn1ObjId);
53RTASN1TMPL_MEMBER_OPT_ANY( Parameters, RTASN1DYNTYPE, RTAsn1DynType);
54RTASN1TMPL_END_SEQCORE();
55#undef RTASN1TMPL_TYPE
56#undef RTASN1TMPL_EXT_NAME
57#undef RTASN1TMPL_INT_NAME
58
59
60/*
61 * Set of X.509 Algorithm Identifiers.
62 */
63#define RTASN1TMPL_TYPE RTCRX509ALGORITHMIDENTIFIERS
64#define RTASN1TMPL_EXT_NAME RTCrX509AlgorithmIdentifiers
65#define RTASN1TMPL_INT_NAME rtCrX509AlgorithmIdentifiers
66RTASN1TMPL_SET_OF(RTCRX509ALGORITHMIDENTIFIER, RTCrX509AlgorithmIdentifier);
67#undef RTASN1TMPL_TYPE
68#undef RTASN1TMPL_EXT_NAME
69#undef RTASN1TMPL_INT_NAME
70
71
72/*
73 * One X.509 AttributeTypeAndValue.
74 */
75#define RTASN1TMPL_TYPE RTCRX509ATTRIBUTETYPEANDVALUE
76#define RTASN1TMPL_EXT_NAME RTCrX509AttributeTypeAndValue
77#define RTASN1TMPL_INT_NAME rtCrX509AttributeTypeAndValue
78RTASN1TMPL_BEGIN_SEQCORE();
79RTASN1TMPL_MEMBER( Type, RTASN1OBJID, RTAsn1ObjId);
80RTASN1TMPL_MEMBER( Value, RTASN1DYNTYPE, RTAsn1DynType);
81RTASN1TMPL_END_SEQCORE();
82#undef RTASN1TMPL_TYPE
83#undef RTASN1TMPL_EXT_NAME
84#undef RTASN1TMPL_INT_NAME
85
86
87/*
88 * Set of X.509 AttributeTypeAndValues / X.509 RelativeDistinguishedName.
89 */
90#define RTASN1TMPL_TYPE RTCRX509ATTRIBUTETYPEANDVALUES
91#define RTASN1TMPL_EXT_NAME RTCrX509AttributeTypeAndValues
92#define RTASN1TMPL_INT_NAME rtCrX509AttributeTypeAndValues
93RTASN1TMPL_SET_OF(RTCRX509ATTRIBUTETYPEANDVALUE, RTCrX509AttributeTypeAndValue);
94#undef RTASN1TMPL_TYPE
95#undef RTASN1TMPL_EXT_NAME
96#undef RTASN1TMPL_INT_NAME
97
98/*
99 * X.509 Name.
100 */
101#define RTASN1TMPL_TYPE RTCRX509NAME
102#define RTASN1TMPL_EXT_NAME RTCrX509Name
103#define RTASN1TMPL_INT_NAME rtCrX509Name
104#undef RTASN1TMPL_SET_SEQ_EXEC_CHECK_SANITY
105#define RTASN1TMPL_SET_SEQ_EXEC_CHECK_SANITY() rc = rtCrX509Name_CheckSanityExtra(pThis, fFlags, pErrInfo, pszErrorTag)
106RTASN1TMPL_SEQ_OF(RTCRX509RELATIVEDISTINGUISHEDNAME, RTCrX509RelativeDistinguishedName);
107#undef RTASN1TMPL_SET_SEQ_EXEC_CHECK_SANITY
108#define RTASN1TMPL_SET_SEQ_EXEC_CHECK_SANITY() do { } while (0)
109#undef RTASN1TMPL_TYPE
110#undef RTASN1TMPL_EXT_NAME
111#undef RTASN1TMPL_INT_NAME
112
113/*
114 * One X.509 GeneralName.
115 * Note! This is simplified and might not work correctly for all types with
116 * non-DER compatible encodings.
117 */
118#define RTASN1TMPL_TYPE RTCRX509GENERALNAME
119#define RTASN1TMPL_EXT_NAME RTCrX509GeneralName
120#define RTASN1TMPL_INT_NAME rtCrX509GeneralName
121RTASN1TMPL_BEGIN_PCHOICE();
122RTASN1TMPL_PCHOICE_XTAG( 0, RTCRX509GENERALNAMECHOICE_OTHER_NAME, u.pT0, CtxTag0, Other, RTASN1DYNTYPE, RTAsn1DynType); /** @todo */
123RTASN1TMPL_PCHOICE_ITAG_CP( 1, RTCRX509GENERALNAMECHOICE_RFC822_NAME, u.pT1_Rfc822, Rfc822, RTASN1STRING, RTAsn1Ia5String);
124RTASN1TMPL_PCHOICE_ITAG_CP( 2, RTCRX509GENERALNAMECHOICE_DNS_NAME, u.pT2_DnsName, DnsType, RTASN1STRING, RTAsn1Ia5String);
125RTASN1TMPL_PCHOICE_XTAG( 3, RTCRX509GENERALNAMECHOICE_X400_ADDRESS, u.pT3, CtxTag3, X400Address, RTASN1DYNTYPE, RTAsn1DynType); /** @todo */
126RTASN1TMPL_PCHOICE_XTAG( 4, RTCRX509GENERALNAMECHOICE_DIRECTORY_NAME, u.pT4, CtxTag4, DirectoryName, RTCRX509NAME, RTCrX509Name);
127RTASN1TMPL_PCHOICE_XTAG( 5, RTCRX509GENERALNAMECHOICE_EDI_PARTY_NAME, u.pT5, CtxTag5, EdiPartyName, RTASN1DYNTYPE, RTAsn1DynType); /** @todo */
128RTASN1TMPL_PCHOICE_ITAG_CP( 6, RTCRX509GENERALNAMECHOICE_URI, u.pT6_Uri, Uri, RTASN1STRING, RTAsn1Ia5String);
129RTASN1TMPL_PCHOICE_ITAG_CP( 7, RTCRX509GENERALNAMECHOICE_IP_ADDRESS, u.pT7_IpAddress, IpAddress, RTASN1OCTETSTRING, RTAsn1OctetString); /** @todo Constraints */
130RTASN1TMPL_PCHOICE_ITAG_CP( 8, RTCRX509GENERALNAMECHOICE_REGISTERED_ID, u.pT8_RegisteredId,RegisteredId,RTASN1OBJID, RTAsn1ObjId);
131RTASN1TMPL_END_PCHOICE();
132#undef RTASN1TMPL_TYPE
133#undef RTASN1TMPL_EXT_NAME
134#undef RTASN1TMPL_INT_NAME
135
136
137/*
138 * Sequence of X.509 GeneralNames.
139 */
140#define RTASN1TMPL_TYPE RTCRX509GENERALNAMES
141#define RTASN1TMPL_EXT_NAME RTCrX509GeneralNames
142#define RTASN1TMPL_INT_NAME rtCrX509GeneralNames
143RTASN1TMPL_SEQ_OF(RTCRX509GENERALNAME, RTCrX509GeneralName);
144#undef RTASN1TMPL_TYPE
145#undef RTASN1TMPL_EXT_NAME
146#undef RTASN1TMPL_INT_NAME
147
148
149/*
150 * X.509 UniqueIdentifier - RTASN1BITSTRING alias.
151 */
152
153
154/*
155 * X.509 SubjectPublicKeyInfo.
156 */
157#define RTASN1TMPL_TYPE RTCRX509SUBJECTPUBLICKEYINFO
158#define RTASN1TMPL_EXT_NAME RTCrX509SubjectPublicKeyInfo
159#define RTASN1TMPL_INT_NAME rtCrX509SubjectPublicKeyInfo
160RTASN1TMPL_BEGIN_SEQCORE();
161RTASN1TMPL_MEMBER( Algorithm, RTCRX509ALGORITHMIDENTIFIER, RTCrX509AlgorithmIdentifier);
162RTASN1TMPL_MEMBER( SubjectPublicKey, RTASN1BITSTRING, RTAsn1BitString);
163RTASN1TMPL_EXEC_CHECK_SANITY( rc = rtCrX509SubjectPublicKeyInfo_CheckSanityExtra(pThis, fFlags, pErrInfo, pszErrorTag) )
164RTASN1TMPL_END_SEQCORE();
165#undef RTASN1TMPL_TYPE
166#undef RTASN1TMPL_EXT_NAME
167#undef RTASN1TMPL_INT_NAME
168
169
170/*
171 * X.509 AuthorityKeyIdentifier (IPRT representation).
172 */
173#define RTASN1TMPL_TYPE RTCRX509AUTHORITYKEYIDENTIFIER
174#define RTASN1TMPL_EXT_NAME RTCrX509AuthorityKeyIdentifier
175#define RTASN1TMPL_INT_NAME rtCrX509AuthorityKeyIdentifier
176RTASN1TMPL_BEGIN_SEQCORE();
177RTASN1TMPL_MEMBER_OPT_ITAG_CP( KeyIdentifier, RTASN1OCTETSTRING, RTAsn1OctetString, 0);
178RTASN1TMPL_MEMBER_OPT_ITAG( AuthorityCertIssuer, RTCRX509GENERALNAMES, RTCrX509GeneralNames, 1);
179RTASN1TMPL_MEMBER_OPT_ITAG_CP( AuthorityCertSerialNumber, RTASN1INTEGER, RTAsn1Integer, 2);
180RTASN1TMPL_END_SEQCORE();
181#undef RTASN1TMPL_TYPE
182#undef RTASN1TMPL_EXT_NAME
183#undef RTASN1TMPL_INT_NAME
184
185
186/*
187 * X.509 OldAuthorityKeyIdentifier (IPRT representation).
188 */
189#define RTASN1TMPL_TYPE RTCRX509OLDAUTHORITYKEYIDENTIFIER
190#define RTASN1TMPL_EXT_NAME RTCrX509OldAuthorityKeyIdentifier
191#define RTASN1TMPL_INT_NAME rtCrX509OldAuthorityKeyIdentifier
192RTASN1TMPL_BEGIN_SEQCORE();
193RTASN1TMPL_MEMBER_OPT_ITAG_CP( KeyIdentifier, RTASN1OCTETSTRING, RTAsn1OctetString, 0);
194RTASN1TMPL_MEMBER_OPT_XTAG( T1, CtxTag1, AuthorityCertIssuer, RTCRX509NAME, RTCrX509Name, 1);
195RTASN1TMPL_MEMBER_OPT_ITAG_CP( AuthorityCertSerialNumber, RTASN1INTEGER, RTAsn1Integer, 2);
196RTASN1TMPL_END_SEQCORE();
197#undef RTASN1TMPL_TYPE
198#undef RTASN1TMPL_EXT_NAME
199#undef RTASN1TMPL_INT_NAME
200
201
202/*
203 * One X.509 PolicyQualifierInfo.
204 */
205#define RTASN1TMPL_TYPE RTCRX509POLICYQUALIFIERINFO
206#define RTASN1TMPL_EXT_NAME RTCrX509PolicyQualifierInfo
207#define RTASN1TMPL_INT_NAME rtCrX509PolicyQualifierInfo
208RTASN1TMPL_BEGIN_SEQCORE();
209RTASN1TMPL_MEMBER( PolicyQualifierId, RTASN1OBJID, RTAsn1ObjId);
210RTASN1TMPL_MEMBER( Qualifier, RTASN1DYNTYPE, RTAsn1DynType);
211RTASN1TMPL_END_SEQCORE();
212#undef RTASN1TMPL_TYPE
213#undef RTASN1TMPL_EXT_NAME
214#undef RTASN1TMPL_INT_NAME
215
216
217/*
218 * Sequence of X.509 PolicyQualifierInfo.
219 */
220#define RTASN1TMPL_TYPE RTCRX509POLICYQUALIFIERINFOS
221#define RTASN1TMPL_EXT_NAME RTCrX509PolicyQualifierInfos
222#define RTASN1TMPL_INT_NAME rtCrX509PolicyQualifierInfos
223RTASN1TMPL_SEQ_OF(RTCRX509POLICYQUALIFIERINFO, RTCrX509PolicyQualifierInfo);
224#undef RTASN1TMPL_TYPE
225#undef RTASN1TMPL_EXT_NAME
226#undef RTASN1TMPL_INT_NAME
227
228
229/*
230 * One X.509 PolicyInformation.
231 */
232#define RTASN1TMPL_TYPE RTCRX509POLICYINFORMATION
233#define RTASN1TMPL_EXT_NAME RTCrX509PolicyInformation
234#define RTASN1TMPL_INT_NAME rtCrX509PolicyInformation
235RTASN1TMPL_BEGIN_SEQCORE();
236RTASN1TMPL_MEMBER( PolicyIdentifier, RTASN1OBJID, RTAsn1ObjId);
237RTASN1TMPL_MEMBER_OPT_ITAG_UC( PolicyQualifiers, RTCRX509POLICYQUALIFIERINFOS, RTCrX509PolicyQualifierInfos, ASN1_TAG_SEQUENCE);
238RTASN1TMPL_END_SEQCORE();
239#undef RTASN1TMPL_TYPE
240#undef RTASN1TMPL_EXT_NAME
241#undef RTASN1TMPL_INT_NAME
242
243
244/*
245 * Sequence of X.509 CertificatePolicies.
246 */
247#define RTASN1TMPL_TYPE RTCRX509CERTIFICATEPOLICIES
248#define RTASN1TMPL_EXT_NAME RTCrX509CertificatePolicies
249#define RTASN1TMPL_INT_NAME rtCrX509CertificatePolicies
250RTASN1TMPL_SEQ_OF(RTCRX509POLICYINFORMATION, RTCrX509PolicyInformation);
251#undef RTASN1TMPL_TYPE
252#undef RTASN1TMPL_EXT_NAME
253#undef RTASN1TMPL_INT_NAME
254
255
256/*
257 * One X.509 PolicyMapping (IPRT representation).
258 */
259#define RTASN1TMPL_TYPE RTCRX509POLICYMAPPING
260#define RTASN1TMPL_EXT_NAME RTCrX509PolicyMapping
261#define RTASN1TMPL_INT_NAME rtCrX509PolicyMapping
262RTASN1TMPL_BEGIN_SEQCORE();
263RTASN1TMPL_MEMBER( IssuerDomainPolicy, RTASN1OBJID, RTAsn1ObjId);
264RTASN1TMPL_MEMBER( SubjectDomainPolicy, RTASN1OBJID, RTAsn1ObjId);
265RTASN1TMPL_END_SEQCORE();
266#undef RTASN1TMPL_TYPE
267#undef RTASN1TMPL_EXT_NAME
268#undef RTASN1TMPL_INT_NAME
269
270
271/*
272 * Sequence of X.509 PolicyMappings (IPRT representation).
273 */
274#define RTASN1TMPL_TYPE RTCRX509POLICYMAPPINGS
275#define RTASN1TMPL_EXT_NAME RTCrX509PolicyMappings
276#define RTASN1TMPL_INT_NAME rtCrX509PolicyMappings
277RTASN1TMPL_SEQ_OF(RTCRX509POLICYMAPPING, RTCrX509PolicyMapping);
278#undef RTASN1TMPL_TYPE
279#undef RTASN1TMPL_EXT_NAME
280#undef RTASN1TMPL_INT_NAME
281
282
283/*
284 * X.509 BasicConstraints (IPRT representation).
285 */
286#define RTASN1TMPL_TYPE RTCRX509BASICCONSTRAINTS
287#define RTASN1TMPL_EXT_NAME RTCrX509BasicConstraints
288#define RTASN1TMPL_INT_NAME rtCrX509BasicConstraints
289RTASN1TMPL_BEGIN_SEQCORE();
290RTASN1TMPL_MEMBER_DEF_ITAG_UP( CA, RTASN1BOOLEAN, RTAsn1Boolean, ASN1_TAG_BOOLEAN, false);
291RTASN1TMPL_MEMBER_OPT_ITAG_UP( PathLenConstraint, RTASN1INTEGER, RTAsn1Integer, ASN1_TAG_INTEGER);
292RTASN1TMPL_END_SEQCORE();
293#undef RTASN1TMPL_TYPE
294#undef RTASN1TMPL_EXT_NAME
295#undef RTASN1TMPL_INT_NAME
296
297
298/*
299 * X.509 GeneralSubtree (IPRT representation).
300 */
301#define RTASN1TMPL_TYPE RTCRX509GENERALSUBTREE
302#define RTASN1TMPL_EXT_NAME RTCrX509GeneralSubtree
303#define RTASN1TMPL_INT_NAME rtCrX509GeneralSubtree
304RTASN1TMPL_BEGIN_SEQCORE();
305RTASN1TMPL_MEMBER( Base, RTCRX509GENERALNAME, RTCrX509GeneralName);
306RTASN1TMPL_MEMBER_DEF_ITAG_UP( Minimum, RTASN1INTEGER, RTAsn1Integer, ASN1_TAG_INTEGER, 0);
307RTASN1TMPL_MEMBER_OPT_ITAG_UP( Maximum, RTASN1INTEGER, RTAsn1Integer, ASN1_TAG_INTEGER);
308RTASN1TMPL_END_SEQCORE();
309#undef RTASN1TMPL_TYPE
310#undef RTASN1TMPL_EXT_NAME
311#undef RTASN1TMPL_INT_NAME
312
313
314
315/*
316 * Sequence of X.509 GeneralSubtrees (IPRT representation).
317 */
318#define RTASN1TMPL_TYPE RTCRX509GENERALSUBTREES
319#define RTASN1TMPL_EXT_NAME RTCrX509GeneralSubtrees
320#define RTASN1TMPL_INT_NAME rtCrX509GeneralSubtrees
321RTASN1TMPL_SEQ_OF(RTCRX509GENERALSUBTREE, RTCrX509GeneralSubtree);
322#undef RTASN1TMPL_TYPE
323#undef RTASN1TMPL_EXT_NAME
324#undef RTASN1TMPL_INT_NAME
325
326
327/*
328 * X.509 NameConstraints (IPRT representation).
329 */
330#define RTASN1TMPL_TYPE RTCRX509NAMECONSTRAINTS
331#define RTASN1TMPL_EXT_NAME RTCrX509NameConstraints
332#define RTASN1TMPL_INT_NAME rtCrX509NameConstraints
333RTASN1TMPL_BEGIN_SEQCORE();
334RTASN1TMPL_MEMBER_OPT_XTAG( T0, CtxTag0, PermittedSubtrees, RTCRX509GENERALSUBTREES, RTCrX509GeneralSubtrees, 0);
335RTASN1TMPL_MEMBER_OPT_XTAG( T1, CtxTag1, ExcludedSubtrees, RTCRX509GENERALSUBTREES, RTCrX509GeneralSubtrees, 1);
336RTASN1TMPL_END_SEQCORE();
337#undef RTASN1TMPL_TYPE
338#undef RTASN1TMPL_EXT_NAME
339#undef RTASN1TMPL_INT_NAME
340
341
342/*
343 * X.509 PolicyConstraints (IPRT representation).
344 */
345#define RTASN1TMPL_TYPE RTCRX509POLICYCONSTRAINTS
346#define RTASN1TMPL_EXT_NAME RTCrX509PolicyConstraints
347#define RTASN1TMPL_INT_NAME rtCrX509PolicyConstraints
348RTASN1TMPL_BEGIN_SEQCORE();
349RTASN1TMPL_MEMBER_OPT_ITAG_CP( RequireExplicitPolicy, RTASN1INTEGER, RTAsn1Integer, 0);
350RTASN1TMPL_MEMBER_OPT_ITAG_CP( InhibitPolicyMapping, RTASN1INTEGER, RTAsn1Integer, 1);
351RTASN1TMPL_END_SEQCORE();
352#undef RTASN1TMPL_TYPE
353#undef RTASN1TMPL_EXT_NAME
354#undef RTASN1TMPL_INT_NAME
355
356
357/*
358 * One X.509 Extension.
359 */
360#define RTASN1TMPL_TYPE RTCRX509EXTENSION
361#define RTASN1TMPL_EXT_NAME RTCrX509Extension
362#define RTASN1TMPL_INT_NAME rtCrX509Extension
363RTASN1TMPL_BEGIN_SEQCORE();
364RTASN1TMPL_MEMBER( ExtnId, RTASN1OBJID, RTAsn1ObjId);
365RTASN1TMPL_MEMBER_DEF_ITAG_UP( Critical, RTASN1BOOLEAN, RTAsn1Boolean, ASN1_TAG_BOOLEAN, false);
366RTASN1TMPL_MEMBER( ExtnValue, RTASN1OCTETSTRING, RTAsn1OctetString);
367RTASN1TMPL_EXEC_DECODE(rc = RTCrX509Extension_ExtnValue_DecodeAsn1(pCursor, fFlags, pThis, "ExtnValue"))
368RTASN1TMPL_EXEC_CLONE( rc = rtCrX509Extension_ExtnValue_Clone(pThis, pSrc))
369RTASN1TMPL_END_SEQCORE();
370#undef RTASN1TMPL_TYPE
371#undef RTASN1TMPL_EXT_NAME
372#undef RTASN1TMPL_INT_NAME
373
374
375/*
376 * Sequence of X.509 Extensions.
377 */
378#define RTASN1TMPL_TYPE RTCRX509EXTENSIONS
379#define RTASN1TMPL_EXT_NAME RTCrX509Extensions
380#define RTASN1TMPL_INT_NAME rtCrX509Extensions
381RTASN1TMPL_SEQ_OF(RTCRX509EXTENSION, RTCrX509Extension);
382#undef RTASN1TMPL_TYPE
383#undef RTASN1TMPL_EXT_NAME
384#undef RTASN1TMPL_INT_NAME
385
386
387/*
388 * X.509 TbsCertificate.
389 */
390#define RTASN1TMPL_TYPE RTCRX509TBSCERTIFICATE
391#define RTASN1TMPL_EXT_NAME RTCrX509TbsCertificate
392#define RTASN1TMPL_INT_NAME rtCrX509TbsCertificate
393RTASN1TMPL_BEGIN_SEQCORE();
394RTASN1TMPL_MEMBER_OPT_XTAG( T0, CtxTag0, Version, RTASN1INTEGER, RTAsn1Integer, 0);
395RTASN1TMPL_MEMBER( SerialNumber, RTASN1INTEGER, RTAsn1Integer);
396RTASN1TMPL_MEMBER( Signature, RTCRX509ALGORITHMIDENTIFIER, RTCrX509AlgorithmIdentifier);
397RTASN1TMPL_MEMBER( Issuer, RTCRX509NAME, RTCrX509Name);
398RTASN1TMPL_MEMBER( Validity, RTCRX509VALIDITY, RTCrX509Validity);
399RTASN1TMPL_MEMBER( Subject, RTCRX509NAME, RTCrX509Name);
400RTASN1TMPL_MEMBER( SubjectPublicKeyInfo, RTCRX509SUBJECTPUBLICKEYINFO, RTCrX509SubjectPublicKeyInfo);
401RTASN1TMPL_MEMBER_OPT_XTAG( T1, CtxTag1, IssuerUniqueId, RTCRX509UNIQUEIDENTIFIER, RTCrX509UniqueIdentifier, 1);
402RTASN1TMPL_MEMBER_OPT_XTAG( T2, CtxTag2, SubjectUniqueId, RTCRX509UNIQUEIDENTIFIER, RTCrX509UniqueIdentifier, 2);
403RTASN1TMPL_MEMBER_OPT_XTAG( T3, CtxTag3, Extensions, RTCRX509EXTENSIONS, RTCrX509Extensions, 3);
404RTASN1TMPL_EXEC_DECODE( rc = RTCrX509TbsCertificate_ReprocessExtensions(pThis, pCursor->pPrimary->pErrInfo) )
405RTASN1TMPL_EXEC_CLONE( rc = RTCrX509TbsCertificate_ReprocessExtensions(pThis, NULL) )
406RTASN1TMPL_EXEC_CHECK_SANITY( rc = rtCrX509TbsCertificate_CheckSanityExtra(pThis, fFlags, pErrInfo, pszErrorTag) )
407RTASN1TMPL_END_SEQCORE();
408#undef RTASN1TMPL_TYPE
409#undef RTASN1TMPL_EXT_NAME
410#undef RTASN1TMPL_INT_NAME
411
412
413/*
414 * One X.509 Certificate.
415 */
416#define RTASN1TMPL_TYPE RTCRX509CERTIFICATE
417#define RTASN1TMPL_EXT_NAME RTCrX509Certificate
418#define RTASN1TMPL_INT_NAME rtCrX509Certificate
419RTASN1TMPL_BEGIN_SEQCORE();
420RTASN1TMPL_MEMBER( TbsCertificate, RTCRX509TBSCERTIFICATE, RTCrX509TbsCertificate);
421RTASN1TMPL_MEMBER( SignatureAlgorithm, RTCRX509ALGORITHMIDENTIFIER, RTCrX509AlgorithmIdentifier);
422RTASN1TMPL_MEMBER( SignatureValue, RTASN1BITSTRING, RTAsn1BitString);
423RTASN1TMPL_EXEC_CHECK_SANITY( rc = rtCrX509Certificate_CheckSanityExtra(pThis, fFlags, pErrInfo, pszErrorTag) )
424RTASN1TMPL_END_SEQCORE();
425#undef RTASN1TMPL_TYPE
426#undef RTASN1TMPL_EXT_NAME
427#undef RTASN1TMPL_INT_NAME
428
429
430/*
431 * Set of X.509 Certificates.
432 */
433/** @todo Microsoft Hacks. ExtendedCertificates. */
434#define RTASN1TMPL_TYPE RTCRX509CERTIFICATES
435#define RTASN1TMPL_EXT_NAME RTCrX509Certificates
436#define RTASN1TMPL_INT_NAME rtCrX509Certificates
437RTASN1TMPL_SET_OF(RTCRX509CERTIFICATE, RTCrX509Certificate);
438#undef RTASN1TMPL_TYPE
439#undef RTASN1TMPL_EXT_NAME
440#undef RTASN1TMPL_INT_NAME
441
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette