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