1 /*        $NetBSD: certificate.h,v 1.2 2021/08/14 16:14:51 christos Exp $       */
2 
3 
4 #include "asn-incl.h"
5 /*
6  *    certificate.h
7  *    "AuthenticationFramework" ASN.1 module encode/decode/extracting/matching/free C src.
8  *    This file was generated by modified eSMACC compiler Sat Dec 11 11:22:49 2004
9  *    The generated files are strongly encouraged to be
10  *    compiled as a module for OpenLDAP Software
11  */
12 
13 #ifndef _certificate_h_
14 #define _certificate_h_
15 
16 
17 
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 #ifdef _WIN32
23 #pragma warning( disable : 4101 )
24 #endif
25 #include "componentlib.h"
26 typedef enum AuthenticationFrameworkAnyId
27 {
28     nullOid_ANY_ID = 0,
29     nullOid2_ANY_ID = 1,
30     nullOid3_ANY_ID = 2,
31     printableStringOid_ANY_ID = 3,
32     printableStringOid2_ANY_ID = 4,
33     printableStringOid3_ANY_ID = 5,
34     printableStringOid4_ANY_ID = 6,
35     printableStringOid5_ANY_ID = 7,
36     printableStringOid6_ANY_ID = 8,
37     printableStringOid7_ANY_ID = 9,
38     iA5StringOid_ANY_ID = 10,
39     octetStringOid_ANY_ID = 11,
40     octetStringOid2_ANY_ID = 12,
41     octetStringOid3_ANY_ID = 13,
42     octetStringOid4_ANY_ID = 14,
43     octetStringOid5_ANY_ID = 15,
44     octetStringOid7_ANY_ID = 17} AuthenticationFrameworkAnyId;
45 
46 void InitAnyAuthenticationFramework();
47 
48 
49 #define V1 0
50 #define V2 1
51 #define V3 2
52 
53 typedef ComponentInt ComponentVersion; /* INTEGER { V1 (0), V2 (1), V3 (2) }  */
54 
55 #define MatchingComponentVersion MatchingComponentInt
56 
57 #define ExtractingComponentVersion ExtractingComponentInt
58 
59 #define BDecComponentVersion BDecComponentInt
60 
61 #define GDecComponentVersion GDecComponentInt
62 
63 
64 typedef ComponentInt ComponentCertificateSerialNumber; /* INTEGER */
65 
66 #define MatchingComponentCertificateSerialNumber MatchingComponentInt
67 
68 #define ExtractingComponentCertificateSerialNumber ExtractingComponentInt
69 
70 #define BDecComponentCertificateSerialNumber BDecComponentInt
71 
72 #define GDecComponentCertificateSerialNumber GDecComponentInt
73 
74 
75 typedef ComponentOid ComponentAttributeType; /* OBJECT IDENTIFIER */
76 
77 #define MatchingComponentAttributeType MatchingComponentOid
78 
79 #define ExtractingComponentAttributeType ExtractingComponentOid
80 
81 #define BDecComponentAttributeType BDecComponentOid
82 
83 #define GDecComponentAttributeType GDecComponentOid
84 
85 
86 typedef ComponentBits ComponentUniqueIdentifier; /* BIT STRING */
87 
88 #define MatchingComponentUniqueIdentifier MatchingComponentBits
89 
90 #define ExtractingComponentUniqueIdentifier ExtractingComponentBits
91 
92 #define BDecComponentUniqueIdentifier BDecComponentBits
93 
94 #define GDecComponentUniqueIdentifier GDecComponentBits
95 
96 
97 typedef struct AlgorithmIdentifier /* SEQUENCE */
98 {
99           Syntax* syntax;
100           ComponentDesc* comp_desc;
101           struct berval identifier;
102           char id_buf[MAX_IDENTIFIER_LEN];
103           ComponentOid algorithm; /* OBJECT IDENTIFIER */
104           ComponentAnyDefinedBy parameters; /* ANY DEFINED BY algorithm OPTIONAL */
105 } ComponentAlgorithmIdentifier;
106 
107 int MatchingComponentAlgorithmIdentifier PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
108 
109 
110 void* ExtractingComponentAlgorithmIdentifier PROTO (( void* mem_op, ComponentReference *cr, ComponentAlgorithmIdentifier *comp ));
111 
112 
113 int BDecComponentAlgorithmIdentifier PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentAlgorithmIdentifier **v, AsnLen *bytesDecoded, int mode));
114 
115 
116 int GDecComponentAlgorithmIdentifier PROTO (( void* mem_op, GenBuf * b, ComponentAlgorithmIdentifier **v, AsnLen *bytesDecoded, int mode));
117 
118 
119 
120 typedef struct Time /* CHOICE */
121 {
122           Syntax* syntax;
123           ComponentDesc* comp_desc;
124           struct berval identifier;
125           char id_buf[MAX_IDENTIFIER_LEN];
126     enum TimeChoiceId
127     {
128         TIME_UTCTIME,
129         TIME_GENERALIZEDTIME
130     } choiceId;
131     union TimeChoiceUnion
132     {
133           ComponentUTCTime* utcTime; /* < unknown type id ?! > */
134           ComponentGeneralizedTime* generalizedTime; /* < unknown type id ?! > */
135     } a;
136 } ComponentTime;
137 
138 int MatchingComponentTime PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
139 
140 
141 void* ExtractingComponentTime PROTO (( void* mem_op, ComponentReference *cr, ComponentTime *comp ));
142 
143 
144 int BDecComponentTime PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentTime **v, AsnLen *bytesDecoded, int mode));
145 
146 
147 int GDecComponentTime PROTO (( void* mem_op, GenBuf * b, ComponentTime **v, AsnLen *bytesDecoded, int mode));
148 
149 
150 
151 typedef struct Extension /* SEQUENCE */
152 {
153           Syntax* syntax;
154           ComponentDesc* comp_desc;
155           struct berval identifier;
156           char id_buf[MAX_IDENTIFIER_LEN];
157           ComponentOid extnID; /* OBJECT IDENTIFIER */
158           ComponentBool* critical; /* BOOLEAN DEFAULT FALSE */
159           ComponentOcts extnValue; /* OCTET STRING */
160 } ComponentExtension;
161 
162 int MatchingComponentExtension PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
163 
164 
165 void* ExtractingComponentExtension PROTO (( void* mem_op, ComponentReference *cr, ComponentExtension *comp ));
166 
167 
168 int BDecComponentExtension PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentExtension **v, AsnLen *bytesDecoded, int mode));
169 
170 
171 int GDecComponentExtension PROTO (( void* mem_op, GenBuf * b, ComponentExtension **v, AsnLen *bytesDecoded, int mode));
172 
173 
174 
175 typedef struct AttributeTypeAndValue /* SEQUENCE */
176 {
177           Syntax* syntax;
178           ComponentDesc* comp_desc;
179           struct berval identifier;
180           char id_buf[MAX_IDENTIFIER_LEN];
181           ComponentAttributeType type; /* AttributeType */
182           ComponentAnyDefinedBy value; /* ANY DEFINED BY type */
183 } ComponentAttributeTypeAndValue;
184 
185 int MatchingComponentAttributeTypeAndValue PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
186 
187 
188 void* ExtractingComponentAttributeTypeAndValue PROTO (( void* mem_op, ComponentReference *cr, ComponentAttributeTypeAndValue *comp ));
189 
190 
191 int BDecComponentAttributeTypeAndValue PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentAttributeTypeAndValue **v, AsnLen *bytesDecoded, int mode));
192 
193 
194 int GDecComponentAttributeTypeAndValue PROTO (( void* mem_op, GenBuf * b, ComponentAttributeTypeAndValue **v, AsnLen *bytesDecoded, int mode));
195 
196 
197 
198 typedef struct Validity /* SEQUENCE */
199 {
200           Syntax* syntax;
201           ComponentDesc* comp_desc;
202           struct berval identifier;
203           char id_buf[MAX_IDENTIFIER_LEN];
204           ComponentTime* notBefore; /* Time */
205           ComponentTime* notAfter; /* Time */
206 } ComponentValidity;
207 
208 int MatchingComponentValidity PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
209 
210 
211 void* ExtractingComponentValidity PROTO (( void* mem_op, ComponentReference *cr, ComponentValidity *comp ));
212 
213 
214 int BDecComponentValidity PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentValidity **v, AsnLen *bytesDecoded, int mode));
215 
216 
217 int GDecComponentValidity PROTO (( void* mem_op, GenBuf * b, ComponentValidity **v, AsnLen *bytesDecoded, int mode));
218 
219 
220 
221 typedef struct SubjectPublicKeyInfo /* SEQUENCE */
222 {
223           Syntax* syntax;
224           ComponentDesc* comp_desc;
225           struct berval identifier;
226           char id_buf[MAX_IDENTIFIER_LEN];
227           ComponentAlgorithmIdentifier* algorithm; /* AlgorithmIdentifier */
228           ComponentBits subjectPublicKey; /* BIT STRING */
229 } ComponentSubjectPublicKeyInfo;
230 
231 int MatchingComponentSubjectPublicKeyInfo PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
232 
233 
234 void* ExtractingComponentSubjectPublicKeyInfo PROTO (( void* mem_op, ComponentReference *cr, ComponentSubjectPublicKeyInfo *comp ));
235 
236 
237 int BDecComponentSubjectPublicKeyInfo PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentSubjectPublicKeyInfo **v, AsnLen *bytesDecoded, int mode));
238 
239 
240 int GDecComponentSubjectPublicKeyInfo PROTO (( void* mem_op, GenBuf * b, ComponentSubjectPublicKeyInfo **v, AsnLen *bytesDecoded, int mode));
241 
242 
243 
244 typedef ComponentList ComponentExtensions; /* SEQUENCE SIZE 1..MAX OF Extension */
245 
246 int MatchingComponentExtensions PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
247 
248 
249 void* ExtractingComponentExtensions PROTO (( void* mem_op, ComponentReference *cr, ComponentExtensions *comp ));
250 
251 
252 int BDecComponentExtensions PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentExtensions **v, AsnLen *bytesDecoded, int mode));
253 
254 
255 int GDecComponentExtensions PROTO (( void* mem_op, GenBuf * b, ComponentExtensions **v, AsnLen *bytesDecoded, int mode));
256 
257 
258 
259 typedef ComponentList ComponentRelativeDistinguishedName; /* SET OF AttributeTypeAndValue */
260 
261 int MatchingComponentRelativeDistinguishedName PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
262 
263 
264 void* ExtractingComponentRelativeDistinguishedName PROTO (( void* mem_op, ComponentReference *cr, ComponentRelativeDistinguishedName *comp ));
265 
266 
267 int BDecComponentRelativeDistinguishedName PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentRelativeDistinguishedName **v, AsnLen *bytesDecoded, int mode));
268 
269 
270 int GDecComponentRelativeDistinguishedName PROTO (( void* mem_op, GenBuf * b, ComponentRelativeDistinguishedName **v, AsnLen *bytesDecoded, int mode));
271 
272 
273 
274 typedef ComponentList ComponentRDNSequence; /* SEQUENCE OF RelativeDistinguishedName */
275 
276 int MatchingComponentRDNSequence PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
277 
278 
279 void* ExtractingComponentRDNSequence PROTO (( void* mem_op, ComponentReference *cr, ComponentRDNSequence *comp ));
280 
281 
282 int BDecComponentRDNSequence PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentRDNSequence **v, AsnLen *bytesDecoded, int mode));
283 
284 
285 int GDecComponentRDNSequence PROTO (( void* mem_op, GenBuf * b, ComponentRDNSequence **v, AsnLen *bytesDecoded, int mode));
286 
287 
288 
289 typedef struct Name /* CHOICE */
290 {
291           Syntax* syntax;
292           ComponentDesc* comp_desc;
293           struct berval identifier;
294           char id_buf[MAX_IDENTIFIER_LEN];
295     enum NameChoiceId
296     {
297         NAME_RDNSEQUENCE
298     } choiceId;
299     union NameChoiceUnion
300     {
301           ComponentRDNSequence* rdnSequence; /* RDNSequence */
302     } a;
303 } ComponentName;
304 
305 int MatchingComponentName PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
306 
307 
308 void* ExtractingComponentName PROTO (( void* mem_op, ComponentReference *cr, ComponentName *comp ));
309 
310 
311 int BDecComponentName PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentName **v, AsnLen *bytesDecoded, int mode));
312 
313 
314 int GDecComponentName PROTO (( void* mem_op, GenBuf * b, ComponentName **v, AsnLen *bytesDecoded, int mode));
315 
316 
317 
318 typedef struct TBSCertificate /* SEQUENCE */
319 {
320           Syntax* syntax;
321           ComponentDesc* comp_desc;
322           struct berval identifier;
323           char id_buf[MAX_IDENTIFIER_LEN];
324           ComponentVersion* version; /* [0] Version DEFAULT v1 */
325           ComponentCertificateSerialNumber serialNumber; /* CertificateSerialNumber */
326           ComponentAlgorithmIdentifier* signature; /* AlgorithmIdentifier */
327           ComponentName* issuer; /* Name */
328           ComponentValidity* validity; /* Validity */
329           ComponentName* subject; /* Name */
330           ComponentSubjectPublicKeyInfo* subjectPublicKeyInfo; /* SubjectPublicKeyInfo */
331           ComponentUniqueIdentifier issuerUniqueIdentifier; /* [1] IMPLICIT UniqueIdentifier OPTIONAL */
332           ComponentUniqueIdentifier subjectUniqueIdentifier; /* [2] IMPLICIT UniqueIdentifier OPTIONAL */
333           ComponentExtensions* extensions; /* [3] Extensions OPTIONAL */
334 } ComponentTBSCertificate;
335 
336 int MatchingComponentTBSCertificate PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
337 
338 
339 void* ExtractingComponentTBSCertificate PROTO (( void* mem_op, ComponentReference *cr, ComponentTBSCertificate *comp ));
340 
341 
342 int BDecComponentTBSCertificate PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentTBSCertificate **v, AsnLen *bytesDecoded, int mode));
343 
344 
345 int GDecComponentTBSCertificate PROTO (( void* mem_op, GenBuf * b, ComponentTBSCertificate **v, AsnLen *bytesDecoded, int mode));
346 
347 
348 
349 typedef struct Certificate /* SEQUENCE */
350 {
351           Syntax* syntax;
352           ComponentDesc* comp_desc;
353           struct berval identifier;
354           char id_buf[MAX_IDENTIFIER_LEN];
355           ComponentTBSCertificate* toBeSigned; /* TBSCertificate */
356           ComponentAlgorithmIdentifier* signatureAlgorithm; /* AlgorithmIdentifier */
357           ComponentBits signature; /* BIT STRING */
358 } ComponentCertificate;
359 
360 int MatchingComponentCertificate PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
361 
362 
363 void* ExtractingComponentCertificate PROTO (( void* mem_op, ComponentReference *cr, ComponentCertificate *comp ));
364 
365 
366 int BDecComponentCertificate PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentCertificate **v, AsnLen *bytesDecoded, int mode));
367 
368 
369 int GDecComponentCertificate PROTO (( void* mem_op, GenBuf * b, ComponentCertificate **v, AsnLen *bytesDecoded, int mode));
370 
371 
372 
373 /* ========== Object Declarations ========== */
374 
375 
376 /* ========== Object Set Declarations ========== */
377 #ifdef __cplusplus
378 extern "C" {
379 #endif
380 
381 #endif /* conditional include of certificate.h */
382