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
11 #ifndef _certificate_h_
12 #define _certificate_h_
21 #pragma warning( disable : 4101 )
23 #include "component.h"
24 typedef enum AuthenticationFrameworkAnyId
28 printableStringOid_ANY_ID = 2} AuthenticationFrameworkAnyId;
31 void InitAnyAuthenticationFramework();
38 typedef ComponentInt ComponentVersion; /* INTEGER { V1 (0), V2 (1), V3 (2) } */
40 #define MatchingComponentVersion MatchingComponentInt
42 #define ExtractingComponentVersion ExtractingComponentInt
44 #define BDecComponentVersion BDecComponentInt
46 #define GDecComponentVersion GDecComponentInt
48 #define FreeComponentVersion FreeComponentInt
50 typedef ComponentInt ComponentCertificateSerialNumber; /* INTEGER */
52 #define MatchingComponentCertificateSerialNumber MatchingComponentInt
54 #define ExtractingComponentCertificateSerialNumber ExtractingComponentInt
56 #define BDecComponentCertificateSerialNumber BDecComponentInt
58 #define GDecComponentCertificateSerialNumber GDecComponentInt
60 #define FreeComponentCertificateSerialNumber FreeComponentInt
62 typedef ComponentOid ComponentAttributeType; /* OBJECT IDENTIFIER */
64 #define MatchingComponentAttributeType MatchingComponentOid
66 #define ExtractingComponentAttributeType ExtractingComponentOid
68 #define BDecComponentAttributeType BDecComponentOid
70 #define GDecComponentAttributeType GDecComponentOid
72 #define FreeComponentAttributeType FreeComponentOid
74 typedef ComponentBits ComponentUniqueIdentifier; /* BIT STRING */
76 #define MatchingComponentUniqueIdentifier MatchingComponentBits
78 #define ExtractingComponentUniqueIdentifier ExtractingComponentBits
80 #define BDecComponentUniqueIdentifier BDecComponentBits
82 #define GDecComponentUniqueIdentifier GDecComponentBits
84 #define FreeComponentUniqueIdentifier FreeComponentBits
86 typedef struct AlgorithmIdentifier /* SEQUENCE */
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;
96 int MatchingComponentAlgorithmIdentifier PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
99 void* ExtractingComponentAlgorithmIdentifier PROTO ((ComponentReference *cr, ComponentAlgorithmIdentifier *comp ));
102 int BDecComponentAlgorithmIdentifier PROTO ((GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentAlgorithmIdentifier **v, AsnLen *bytesDecoded, int mode));
105 int GDecComponentAlgorithmIdentifier PROTO ((GenBuf * b, ComponentAlgorithmIdentifier **v, AsnLen *bytesDecoded, int mode));
108 void FreeComponentAlgorithmIdentifier(ComponentAlgorithmIdentifier *v);
112 typedef struct Time /* CHOICE */
115 ComponentDesc* comp_desc;
116 struct berval identifier;
117 char id_buf[MAX_IDENTIFIER_LEN];
123 union TimeChoiceUnion
125 ComponentUTCTime* utcTime; /* < unknown type id ?! > */
126 ComponentGeneralizedTime* generalizedTime; /* < unknown type id ?! > */
130 int MatchingComponentTime PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
133 void* ExtractingComponentTime PROTO ((ComponentReference *cr, ComponentTime *comp ));
136 int BDecComponentTime PROTO ((GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentTime **v, AsnLen *bytesDecoded, int mode));
139 int GDecComponentTime PROTO ((GenBuf * b, ComponentTime **v, AsnLen *bytesDecoded, int mode));
142 void FreeComponentTime(ComponentTime *v);
146 typedef struct Extension /* SEQUENCE */
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;
156 int MatchingComponentExtension PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
159 void* ExtractingComponentExtension PROTO ((ComponentReference *cr, ComponentExtension *comp ));
162 int BDecComponentExtension PROTO ((GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentExtension **v, AsnLen *bytesDecoded, int mode));
165 int GDecComponentExtension PROTO ((GenBuf * b, ComponentExtension **v, AsnLen *bytesDecoded, int mode));
168 void FreeComponentExtension(ComponentExtension *v);
172 typedef struct AttributeTypeAndValue /* SEQUENCE */
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;
182 int MatchingComponentAttributeTypeAndValue PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
185 void* ExtractingComponentAttributeTypeAndValue PROTO ((ComponentReference *cr, ComponentAttributeTypeAndValue *comp ));
188 int BDecComponentAttributeTypeAndValue PROTO ((GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentAttributeTypeAndValue **v, AsnLen *bytesDecoded, int mode));
191 int GDecComponentAttributeTypeAndValue PROTO ((GenBuf * b, ComponentAttributeTypeAndValue **v, AsnLen *bytesDecoded, int mode));
194 void FreeComponentAttributeTypeAndValue(ComponentAttributeTypeAndValue *v);
198 typedef struct Validity /* SEQUENCE */
201 ComponentDesc* comp_desc;
202 struct berval identifier;
203 char id_buf[MAX_IDENTIFIER_LEN];
204 ComponentTime* notBefore; /* Time */
205 ComponentTime* notAfter; /* Time */
208 int MatchingComponentValidity PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
211 void* ExtractingComponentValidity PROTO ((ComponentReference *cr, ComponentValidity *comp ));
214 int BDecComponentValidity PROTO ((GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentValidity **v, AsnLen *bytesDecoded, int mode));
217 int GDecComponentValidity PROTO ((GenBuf * b, ComponentValidity **v, AsnLen *bytesDecoded, int mode));
220 void FreeComponentValidity(ComponentValidity *v);
224 typedef struct SubjectPublicKeyInfo /* SEQUENCE */
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;
234 int MatchingComponentSubjectPublicKeyInfo PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
237 void* ExtractingComponentSubjectPublicKeyInfo PROTO ((ComponentReference *cr, ComponentSubjectPublicKeyInfo *comp ));
240 int BDecComponentSubjectPublicKeyInfo PROTO ((GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentSubjectPublicKeyInfo **v, AsnLen *bytesDecoded, int mode));
243 int GDecComponentSubjectPublicKeyInfo PROTO ((GenBuf * b, ComponentSubjectPublicKeyInfo **v, AsnLen *bytesDecoded, int mode));
246 void FreeComponentSubjectPublicKeyInfo(ComponentSubjectPublicKeyInfo *v);
250 typedef ComponentList ComponentExtensions; /* SEQUENCE SIZE 1..MAX OF Extension */
252 int MatchingComponentExtensions PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
255 void* ExtractingComponentExtensions PROTO ((ComponentReference *cr, ComponentExtensions *comp ));
258 int BDecComponentExtensions PROTO ((GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentExtensions **v, AsnLen *bytesDecoded, int mode));
261 int GDecComponentExtensions PROTO ((GenBuf * b, ComponentExtensions **v, AsnLen *bytesDecoded, int mode));
264 void FreeComponentExtensions(ComponentExtensions *v);
268 typedef ComponentList ComponentRelativeDistinguishedName; /* SET OF AttributeTypeAndValue */
270 int MatchingComponentRelativeDistinguishedName PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
273 void* ExtractingComponentRelativeDistinguishedName PROTO ((ComponentReference *cr, ComponentRelativeDistinguishedName *comp ));
276 int BDecComponentRelativeDistinguishedName PROTO ((GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentRelativeDistinguishedName **v, AsnLen *bytesDecoded, int mode));
279 int GDecComponentRelativeDistinguishedName PROTO ((GenBuf * b, ComponentRelativeDistinguishedName **v, AsnLen *bytesDecoded, int mode));
282 void FreeComponentRelativeDistinguishedName(ComponentRelativeDistinguishedName *v);
286 typedef ComponentList ComponentRDNSequence; /* SEQUENCE OF RelativeDistinguishedName */
288 int MatchingComponentRDNSequence PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
291 void* ExtractingComponentRDNSequence PROTO ((ComponentReference *cr, ComponentRDNSequence *comp ));
294 int BDecComponentRDNSequence PROTO ((GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentRDNSequence **v, AsnLen *bytesDecoded, int mode));
297 int GDecComponentRDNSequence PROTO ((GenBuf * b, ComponentRDNSequence **v, AsnLen *bytesDecoded, int mode));
300 void FreeComponentRDNSequence(ComponentRDNSequence *v);
304 typedef struct Name /* CHOICE */
307 ComponentDesc* comp_desc;
308 struct berval identifier;
309 char id_buf[MAX_IDENTIFIER_LEN];
314 union NameChoiceUnion
316 ComponentRDNSequence* rdnSequence; /* RDNSequence */
320 int MatchingComponentName PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
323 void* ExtractingComponentName PROTO ((ComponentReference *cr, ComponentName *comp ));
326 int BDecComponentName PROTO ((GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentName **v, AsnLen *bytesDecoded, int mode));
329 int GDecComponentName PROTO ((GenBuf * b, ComponentName **v, AsnLen *bytesDecoded, int mode));
332 void FreeComponentName(ComponentName *v);
336 typedef struct TBSCertificate /* SEQUENCE */
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;
354 int MatchingComponentTBSCertificate PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
357 void* ExtractingComponentTBSCertificate PROTO ((ComponentReference *cr, ComponentTBSCertificate *comp ));
360 int BDecComponentTBSCertificate PROTO ((GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentTBSCertificate **v, AsnLen *bytesDecoded, int mode));
363 int GDecComponentTBSCertificate PROTO ((GenBuf * b, ComponentTBSCertificate **v, AsnLen *bytesDecoded, int mode));
366 void FreeComponentTBSCertificate(ComponentTBSCertificate *v);
370 typedef struct Certificate /* SEQUENCE */
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;
381 int MatchingComponentCertificate PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
384 void* ExtractingComponentCertificate PROTO ((ComponentReference *cr, ComponentCertificate *comp ));
387 int BDecComponentCertificate PROTO ((GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentCertificate **v, AsnLen *bytesDecoded, int mode));
390 int GDecComponentCertificate PROTO ((GenBuf * b, ComponentCertificate **v, AsnLen *bytesDecoded, int mode));
393 void FreeComponentCertificate(ComponentCertificate *v);
397 /* ========== Object Declarations ========== */
400 /* ========== Object Set Declarations ========== */
405 #endif /* conditional include of certificate.h */