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