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