Back to index

openldap  2.4.31
certificate.h
Go to the documentation of this file.
00001 
00002 #include "asn-incl.h"
00003 /*
00004  *    certificate.h
00005  *    "AuthenticationFramework" ASN.1 module encode/decode/extracting/matching/free C src.
00006  *    This file was generated by modified eSMACC compiler Sat Dec 11 11:22:49 2004
00007  *    The generated files are strongly encouraged to be
00008  *    compiled as a module for OpenLDAP Software
00009  */
00010 
00011 #ifndef _certificate_h_
00012 #define _certificate_h_
00013 
00014 
00015 
00016 
00017 #ifdef __cplusplus
00018 extern "C" {
00019 #endif
00020 #ifdef _WIN32
00021 #pragma warning( disable : 4101 )
00022 #endif
00023 #include "componentlib.h"
00024 typedef enum AuthenticationFrameworkAnyId
00025 {
00026     nullOid_ANY_ID = 0,
00027     nullOid2_ANY_ID = 1,
00028     nullOid3_ANY_ID = 2,
00029     printableStringOid_ANY_ID = 3,
00030     printableStringOid2_ANY_ID = 4,
00031     printableStringOid3_ANY_ID = 5,
00032     printableStringOid4_ANY_ID = 6,
00033     printableStringOid5_ANY_ID = 7,
00034     printableStringOid6_ANY_ID = 8,
00035     printableStringOid7_ANY_ID = 9,
00036     iA5StringOid_ANY_ID = 10,
00037     octetStringOid_ANY_ID = 11,
00038     octetStringOid2_ANY_ID = 12,
00039     octetStringOid3_ANY_ID = 13,
00040     octetStringOid4_ANY_ID = 14,
00041     octetStringOid5_ANY_ID = 15,
00042     octetStringOid7_ANY_ID = 17} AuthenticationFrameworkAnyId;
00043 
00044 void InitAnyAuthenticationFramework();
00045 
00046 
00047 #define V1 0
00048 #define V2 1
00049 #define V3 2
00050 
00051 typedef ComponentInt ComponentVersion; /* INTEGER { V1 (0), V2 (1), V3 (2) }  */
00052 
00053 #define MatchingComponentVersion MatchingComponentInt
00054 
00055 #define ExtractingComponentVersion ExtractingComponentInt
00056 
00057 #define BDecComponentVersion BDecComponentInt
00058 
00059 #define GDecComponentVersion GDecComponentInt
00060 
00061 
00062 typedef ComponentInt ComponentCertificateSerialNumber; /* INTEGER */
00063 
00064 #define MatchingComponentCertificateSerialNumber MatchingComponentInt
00065 
00066 #define ExtractingComponentCertificateSerialNumber ExtractingComponentInt
00067 
00068 #define BDecComponentCertificateSerialNumber BDecComponentInt
00069 
00070 #define GDecComponentCertificateSerialNumber GDecComponentInt
00071 
00072 
00073 typedef ComponentOid ComponentAttributeType; /* OBJECT IDENTIFIER */
00074 
00075 #define MatchingComponentAttributeType MatchingComponentOid
00076 
00077 #define ExtractingComponentAttributeType ExtractingComponentOid
00078 
00079 #define BDecComponentAttributeType BDecComponentOid
00080 
00081 #define GDecComponentAttributeType GDecComponentOid
00082 
00083 
00084 typedef ComponentBits ComponentUniqueIdentifier; /* BIT STRING */
00085 
00086 #define MatchingComponentUniqueIdentifier MatchingComponentBits
00087 
00088 #define ExtractingComponentUniqueIdentifier ExtractingComponentBits
00089 
00090 #define BDecComponentUniqueIdentifier BDecComponentBits
00091 
00092 #define GDecComponentUniqueIdentifier GDecComponentBits
00093 
00094 
00095 typedef struct AlgorithmIdentifier /* SEQUENCE */
00096 {
00097        Syntax* syntax;
00098        ComponentDesc* comp_desc;
00099        struct berval identifier;
00100        char id_buf[MAX_IDENTIFIER_LEN];
00101        ComponentOid algorithm; /* OBJECT IDENTIFIER */
00102        ComponentAnyDefinedBy parameters; /* ANY DEFINED BY algorithm OPTIONAL */
00103 } ComponentAlgorithmIdentifier;
00104 
00105 int MatchingComponentAlgorithmIdentifier PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
00106 
00107 
00108 void* ExtractingComponentAlgorithmIdentifier PROTO (( void* mem_op, ComponentReference *cr, ComponentAlgorithmIdentifier *comp ));
00109 
00110 
00111 int BDecComponentAlgorithmIdentifier PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentAlgorithmIdentifier **v, AsnLen *bytesDecoded, int mode));
00112 
00113 
00114 int GDecComponentAlgorithmIdentifier PROTO (( void* mem_op, GenBuf * b, ComponentAlgorithmIdentifier **v, AsnLen *bytesDecoded, int mode));
00115 
00116 
00117 
00118 typedef struct Time /* CHOICE */
00119 {
00120        Syntax* syntax;
00121        ComponentDesc* comp_desc;
00122        struct berval identifier;
00123        char id_buf[MAX_IDENTIFIER_LEN];
00124     enum TimeChoiceId
00125     {
00126         TIME_UTCTIME,
00127         TIME_GENERALIZEDTIME
00128     } choiceId;
00129     union TimeChoiceUnion
00130     {
00131        ComponentUTCTime* utcTime; /* < unknown type id ?! > */
00132        ComponentGeneralizedTime* generalizedTime; /* < unknown type id ?! > */
00133     } a;
00134 } ComponentTime;
00135 
00136 int MatchingComponentTime PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
00137 
00138 
00139 void* ExtractingComponentTime PROTO (( void* mem_op, ComponentReference *cr, ComponentTime *comp ));
00140 
00141 
00142 int BDecComponentTime PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentTime **v, AsnLen *bytesDecoded, int mode));
00143 
00144 
00145 int GDecComponentTime PROTO (( void* mem_op, GenBuf * b, ComponentTime **v, AsnLen *bytesDecoded, int mode));
00146 
00147 
00148 
00149 typedef struct Extension /* SEQUENCE */
00150 {
00151        Syntax* syntax;
00152        ComponentDesc* comp_desc;
00153        struct berval identifier;
00154        char id_buf[MAX_IDENTIFIER_LEN];
00155        ComponentOid extnID; /* OBJECT IDENTIFIER */
00156        ComponentBool* critical; /* BOOLEAN DEFAULT FALSE */
00157        ComponentOcts extnValue; /* OCTET STRING */
00158 } ComponentExtension;
00159 
00160 int MatchingComponentExtension PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
00161 
00162 
00163 void* ExtractingComponentExtension PROTO (( void* mem_op, ComponentReference *cr, ComponentExtension *comp ));
00164 
00165 
00166 int BDecComponentExtension PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentExtension **v, AsnLen *bytesDecoded, int mode));
00167 
00168 
00169 int GDecComponentExtension PROTO (( void* mem_op, GenBuf * b, ComponentExtension **v, AsnLen *bytesDecoded, int mode));
00170 
00171 
00172 
00173 typedef struct AttributeTypeAndValue /* SEQUENCE */
00174 {
00175        Syntax* syntax;
00176        ComponentDesc* comp_desc;
00177        struct berval identifier;
00178        char id_buf[MAX_IDENTIFIER_LEN];
00179        ComponentAttributeType type; /* AttributeType */
00180        ComponentAnyDefinedBy value; /* ANY DEFINED BY type */
00181 } ComponentAttributeTypeAndValue;
00182 
00183 int MatchingComponentAttributeTypeAndValue PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
00184 
00185 
00186 void* ExtractingComponentAttributeTypeAndValue PROTO (( void* mem_op, ComponentReference *cr, ComponentAttributeTypeAndValue *comp ));
00187 
00188 
00189 int BDecComponentAttributeTypeAndValue PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentAttributeTypeAndValue **v, AsnLen *bytesDecoded, int mode));
00190 
00191 
00192 int GDecComponentAttributeTypeAndValue PROTO (( void* mem_op, GenBuf * b, ComponentAttributeTypeAndValue **v, AsnLen *bytesDecoded, int mode));
00193 
00194 
00195 
00196 typedef struct Validity /* SEQUENCE */
00197 {
00198        Syntax* syntax;
00199        ComponentDesc* comp_desc;
00200        struct berval identifier;
00201        char id_buf[MAX_IDENTIFIER_LEN];
00202        ComponentTime* notBefore; /* Time */
00203        ComponentTime* notAfter; /* Time */
00204 } ComponentValidity;
00205 
00206 int MatchingComponentValidity PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
00207 
00208 
00209 void* ExtractingComponentValidity PROTO (( void* mem_op, ComponentReference *cr, ComponentValidity *comp ));
00210 
00211 
00212 int BDecComponentValidity PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentValidity **v, AsnLen *bytesDecoded, int mode));
00213 
00214 
00215 int GDecComponentValidity PROTO (( void* mem_op, GenBuf * b, ComponentValidity **v, AsnLen *bytesDecoded, int mode));
00216 
00217 
00218 
00219 typedef struct SubjectPublicKeyInfo /* SEQUENCE */
00220 {
00221        Syntax* syntax;
00222        ComponentDesc* comp_desc;
00223        struct berval identifier;
00224        char id_buf[MAX_IDENTIFIER_LEN];
00225        ComponentAlgorithmIdentifier* algorithm; /* AlgorithmIdentifier */
00226        ComponentBits subjectPublicKey; /* BIT STRING */
00227 } ComponentSubjectPublicKeyInfo;
00228 
00229 int MatchingComponentSubjectPublicKeyInfo PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
00230 
00231 
00232 void* ExtractingComponentSubjectPublicKeyInfo PROTO (( void* mem_op, ComponentReference *cr, ComponentSubjectPublicKeyInfo *comp ));
00233 
00234 
00235 int BDecComponentSubjectPublicKeyInfo PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentSubjectPublicKeyInfo **v, AsnLen *bytesDecoded, int mode));
00236 
00237 
00238 int GDecComponentSubjectPublicKeyInfo PROTO (( void* mem_op, GenBuf * b, ComponentSubjectPublicKeyInfo **v, AsnLen *bytesDecoded, int mode));
00239 
00240 
00241 
00242 typedef ComponentList ComponentExtensions; /* SEQUENCE SIZE 1..MAX OF Extension */
00243 
00244 int MatchingComponentExtensions PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
00245 
00246 
00247 void* ExtractingComponentExtensions PROTO (( void* mem_op, ComponentReference *cr, ComponentExtensions *comp ));
00248 
00249 
00250 int BDecComponentExtensions PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentExtensions **v, AsnLen *bytesDecoded, int mode));
00251 
00252 
00253 int GDecComponentExtensions PROTO (( void* mem_op, GenBuf * b, ComponentExtensions **v, AsnLen *bytesDecoded, int mode));
00254 
00255 
00256 
00257 typedef ComponentList ComponentRelativeDistinguishedName; /* SET OF AttributeTypeAndValue */
00258 
00259 int MatchingComponentRelativeDistinguishedName PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
00260 
00261 
00262 void* ExtractingComponentRelativeDistinguishedName PROTO (( void* mem_op, ComponentReference *cr, ComponentRelativeDistinguishedName *comp ));
00263 
00264 
00265 int BDecComponentRelativeDistinguishedName PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentRelativeDistinguishedName **v, AsnLen *bytesDecoded, int mode));
00266 
00267 
00268 int GDecComponentRelativeDistinguishedName PROTO (( void* mem_op, GenBuf * b, ComponentRelativeDistinguishedName **v, AsnLen *bytesDecoded, int mode));
00269 
00270 
00271 
00272 typedef ComponentList ComponentRDNSequence; /* SEQUENCE OF RelativeDistinguishedName */
00273 
00274 int MatchingComponentRDNSequence PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
00275 
00276 
00277 void* ExtractingComponentRDNSequence PROTO (( void* mem_op, ComponentReference *cr, ComponentRDNSequence *comp ));
00278 
00279 
00280 int BDecComponentRDNSequence PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentRDNSequence **v, AsnLen *bytesDecoded, int mode));
00281 
00282 
00283 int GDecComponentRDNSequence PROTO (( void* mem_op, GenBuf * b, ComponentRDNSequence **v, AsnLen *bytesDecoded, int mode));
00284 
00285 
00286 
00287 typedef struct Name /* CHOICE */
00288 {
00289        Syntax* syntax;
00290        ComponentDesc* comp_desc;
00291        struct berval identifier;
00292        char id_buf[MAX_IDENTIFIER_LEN];
00293     enum NameChoiceId
00294     {
00295         NAME_RDNSEQUENCE
00296     } choiceId;
00297     union NameChoiceUnion
00298     {
00299        ComponentRDNSequence* rdnSequence; /* RDNSequence */
00300     } a;
00301 } ComponentName;
00302 
00303 int MatchingComponentName PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
00304 
00305 
00306 void* ExtractingComponentName PROTO (( void* mem_op, ComponentReference *cr, ComponentName *comp ));
00307 
00308 
00309 int BDecComponentName PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentName **v, AsnLen *bytesDecoded, int mode));
00310 
00311 
00312 int GDecComponentName PROTO (( void* mem_op, GenBuf * b, ComponentName **v, AsnLen *bytesDecoded, int mode));
00313 
00314 
00315 
00316 typedef struct TBSCertificate /* SEQUENCE */
00317 {
00318        Syntax* syntax;
00319        ComponentDesc* comp_desc;
00320        struct berval identifier;
00321        char id_buf[MAX_IDENTIFIER_LEN];
00322        ComponentVersion* version; /* [0] Version DEFAULT v1 */
00323        ComponentCertificateSerialNumber serialNumber; /* CertificateSerialNumber */
00324        ComponentAlgorithmIdentifier* signature; /* AlgorithmIdentifier */
00325        ComponentName* issuer; /* Name */
00326        ComponentValidity* validity; /* Validity */
00327        ComponentName* subject; /* Name */
00328        ComponentSubjectPublicKeyInfo* subjectPublicKeyInfo; /* SubjectPublicKeyInfo */
00329        ComponentUniqueIdentifier issuerUniqueIdentifier; /* [1] IMPLICIT UniqueIdentifier OPTIONAL */
00330        ComponentUniqueIdentifier subjectUniqueIdentifier; /* [2] IMPLICIT UniqueIdentifier OPTIONAL */
00331        ComponentExtensions* extensions; /* [3] Extensions OPTIONAL */
00332 } ComponentTBSCertificate;
00333 
00334 int MatchingComponentTBSCertificate PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
00335 
00336 
00337 void* ExtractingComponentTBSCertificate PROTO (( void* mem_op, ComponentReference *cr, ComponentTBSCertificate *comp ));
00338 
00339 
00340 int BDecComponentTBSCertificate PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentTBSCertificate **v, AsnLen *bytesDecoded, int mode));
00341 
00342 
00343 int GDecComponentTBSCertificate PROTO (( void* mem_op, GenBuf * b, ComponentTBSCertificate **v, AsnLen *bytesDecoded, int mode));
00344 
00345 
00346 
00347 typedef struct Certificate /* SEQUENCE */
00348 {
00349        Syntax* syntax;
00350        ComponentDesc* comp_desc;
00351        struct berval identifier;
00352        char id_buf[MAX_IDENTIFIER_LEN];
00353        ComponentTBSCertificate* toBeSigned; /* TBSCertificate */
00354        ComponentAlgorithmIdentifier* signatureAlgorithm; /* AlgorithmIdentifier */
00355        ComponentBits signature; /* BIT STRING */
00356 } ComponentCertificate;
00357 
00358 int MatchingComponentCertificate PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
00359 
00360 
00361 void* ExtractingComponentCertificate PROTO (( void* mem_op, ComponentReference *cr, ComponentCertificate *comp ));
00362 
00363 
00364 int BDecComponentCertificate PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentCertificate **v, AsnLen *bytesDecoded, int mode));
00365 
00366 
00367 int GDecComponentCertificate PROTO (( void* mem_op, GenBuf * b, ComponentCertificate **v, AsnLen *bytesDecoded, int mode));
00368 
00369 
00370 
00371 /* ========== Object Declarations ========== */
00372 
00373 
00374 /* ========== Object Set Declarations ========== */
00375 #ifdef __cplusplus
00376 extern "C" {
00377 #endif
00378 
00379 #endif /* conditional include of certificate.h */