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