#include "asn-incl.h" /* * certificate.h * "AuthenticationFramework" ASN.1 module encode/decode/extracting/matching/free C src. * This file was generated by modified eSMACC compiler Sat Oct 23 20:25:08 2004 * The generated files are strongly encouraged to be * compiled as a module for OpenLDAP Software */ #ifndef _certificate_h_ #define _certificate_h_ #ifdef __cplusplus extern "C" { #endif #ifdef _WIN32 #pragma warning( disable : 4101 ) #endif #include "component.h" typedef enum AuthenticationFrameworkAnyId { nullOid_ANY_ID = 0, nullOid2_ANY_ID = 1, printableStringOid_ANY_ID = 2} AuthenticationFrameworkAnyId; void InitAnyAuthenticationFramework(); #define V1 0 #define V2 1 #define V3 2 typedef ComponentInt ComponentVersion; /* INTEGER { V1 (0), V2 (1), V3 (2) } */ #define MatchingComponentVersion MatchingComponentInt #define ExtractingComponentVersion ExtractingComponentInt #define BDecComponentVersion BDecComponentInt #define GDecComponentVersion GDecComponentInt #define FreeComponentVersion FreeComponentInt typedef ComponentInt ComponentCertificateSerialNumber; /* INTEGER */ #define MatchingComponentCertificateSerialNumber MatchingComponentInt #define ExtractingComponentCertificateSerialNumber ExtractingComponentInt #define BDecComponentCertificateSerialNumber BDecComponentInt #define GDecComponentCertificateSerialNumber GDecComponentInt #define FreeComponentCertificateSerialNumber FreeComponentInt typedef ComponentOid ComponentAttributeType; /* OBJECT IDENTIFIER */ #define MatchingComponentAttributeType MatchingComponentOid #define ExtractingComponentAttributeType ExtractingComponentOid #define BDecComponentAttributeType BDecComponentOid #define GDecComponentAttributeType GDecComponentOid #define FreeComponentAttributeType FreeComponentOid typedef ComponentBits ComponentUniqueIdentifier; /* BIT STRING */ #define MatchingComponentUniqueIdentifier MatchingComponentBits #define ExtractingComponentUniqueIdentifier ExtractingComponentBits #define BDecComponentUniqueIdentifier BDecComponentBits #define GDecComponentUniqueIdentifier GDecComponentBits #define FreeComponentUniqueIdentifier FreeComponentBits typedef struct AlgorithmIdentifier /* SEQUENCE */ { Syntax* syntax; ComponentDesc* comp_desc; struct berval identifier; char id_buf[MAX_IDENTIFIER_LEN]; ComponentOid algorithm; /* OBJECT IDENTIFIER */ ComponentAnyDefinedBy parameters; /* ANY DEFINED BY algorithm OPTIONAL */ } ComponentAlgorithmIdentifier; int MatchingComponentAlgorithmIdentifier PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 )); void* ExtractingComponentAlgorithmIdentifier PROTO ((ComponentReference *cr, ComponentAlgorithmIdentifier *comp )); int BDecComponentAlgorithmIdentifier PROTO ((GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentAlgorithmIdentifier **v, AsnLen *bytesDecoded, int mode)); int GDecComponentAlgorithmIdentifier PROTO ((GenBuf * b, ComponentAlgorithmIdentifier **v, AsnLen *bytesDecoded, int mode)); void FreeComponentAlgorithmIdentifier(ComponentAlgorithmIdentifier *v); typedef struct Time /* CHOICE */ { Syntax* syntax; ComponentDesc* comp_desc; struct berval identifier; char id_buf[MAX_IDENTIFIER_LEN]; enum TimeChoiceId { TIME_UTCTIME, TIME_GENERALIZEDTIME } choiceId; union TimeChoiceUnion { ComponentUTCTime* utcTime; /* < unknown type id ?! > */ ComponentGeneralizedTime* generalizedTime; /* < unknown type id ?! > */ } a; } ComponentTime; int MatchingComponentTime PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 )); void* ExtractingComponentTime PROTO ((ComponentReference *cr, ComponentTime *comp )); int BDecComponentTime PROTO ((GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentTime **v, AsnLen *bytesDecoded, int mode)); int GDecComponentTime PROTO ((GenBuf * b, ComponentTime **v, AsnLen *bytesDecoded, int mode)); void FreeComponentTime(ComponentTime *v); typedef struct Extension /* SEQUENCE */ { Syntax* syntax; ComponentDesc* comp_desc; struct berval identifier; char id_buf[MAX_IDENTIFIER_LEN]; ComponentOid extnID; /* OBJECT IDENTIFIER */ ComponentOcts extnValue; /* OCTET STRING */ } ComponentExtension; int MatchingComponentExtension PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 )); void* ExtractingComponentExtension PROTO ((ComponentReference *cr, ComponentExtension *comp )); int BDecComponentExtension PROTO ((GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentExtension **v, AsnLen *bytesDecoded, int mode)); int GDecComponentExtension PROTO ((GenBuf * b, ComponentExtension **v, AsnLen *bytesDecoded, int mode)); void FreeComponentExtension(ComponentExtension *v); typedef struct AttributeTypeAndValue /* SEQUENCE */ { Syntax* syntax; ComponentDesc* comp_desc; struct berval identifier; char id_buf[MAX_IDENTIFIER_LEN]; ComponentAttributeType type; /* AttributeType */ ComponentAnyDefinedBy value; /* ANY DEFINED BY type */ } ComponentAttributeTypeAndValue; int MatchingComponentAttributeTypeAndValue PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 )); void* ExtractingComponentAttributeTypeAndValue PROTO ((ComponentReference *cr, ComponentAttributeTypeAndValue *comp )); int BDecComponentAttributeTypeAndValue PROTO ((GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentAttributeTypeAndValue **v, AsnLen *bytesDecoded, int mode)); int GDecComponentAttributeTypeAndValue PROTO ((GenBuf * b, ComponentAttributeTypeAndValue **v, AsnLen *bytesDecoded, int mode)); void FreeComponentAttributeTypeAndValue(ComponentAttributeTypeAndValue *v); typedef struct Validity /* SEQUENCE */ { Syntax* syntax; ComponentDesc* comp_desc; struct berval identifier; char id_buf[MAX_IDENTIFIER_LEN]; ComponentTime* notBefore; /* Time */ ComponentTime* notAfter; /* Time */ } ComponentValidity; int MatchingComponentValidity PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 )); void* ExtractingComponentValidity PROTO ((ComponentReference *cr, ComponentValidity *comp )); int BDecComponentValidity PROTO ((GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentValidity **v, AsnLen *bytesDecoded, int mode)); int GDecComponentValidity PROTO ((GenBuf * b, ComponentValidity **v, AsnLen *bytesDecoded, int mode)); void FreeComponentValidity(ComponentValidity *v); typedef struct SubjectPublicKeyInfo /* SEQUENCE */ { Syntax* syntax; ComponentDesc* comp_desc; struct berval identifier; char id_buf[MAX_IDENTIFIER_LEN]; ComponentAlgorithmIdentifier* algorithm; /* AlgorithmIdentifier */ ComponentBits subjectPublicKey; /* BIT STRING */ } ComponentSubjectPublicKeyInfo; int MatchingComponentSubjectPublicKeyInfo PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 )); void* ExtractingComponentSubjectPublicKeyInfo PROTO ((ComponentReference *cr, ComponentSubjectPublicKeyInfo *comp )); int BDecComponentSubjectPublicKeyInfo PROTO ((GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentSubjectPublicKeyInfo **v, AsnLen *bytesDecoded, int mode)); int GDecComponentSubjectPublicKeyInfo PROTO ((GenBuf * b, ComponentSubjectPublicKeyInfo **v, AsnLen *bytesDecoded, int mode)); void FreeComponentSubjectPublicKeyInfo(ComponentSubjectPublicKeyInfo *v); typedef ComponentList ComponentExtensions; /* SEQUENCE SIZE 1..MAX OF Extension */ int MatchingComponentExtensions PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 )); void* ExtractingComponentExtensions PROTO ((ComponentReference *cr, ComponentExtensions *comp )); int BDecComponentExtensions PROTO ((GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentExtensions **v, AsnLen *bytesDecoded, int mode)); int GDecComponentExtensions PROTO ((GenBuf * b, ComponentExtensions **v, AsnLen *bytesDecoded, int mode)); void FreeComponentExtensions(ComponentExtensions *v); typedef ComponentList ComponentRelativeDistinguishedName; /* SET OF AttributeTypeAndValue */ int MatchingComponentRelativeDistinguishedName PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 )); void* ExtractingComponentRelativeDistinguishedName PROTO ((ComponentReference *cr, ComponentRelativeDistinguishedName *comp )); int BDecComponentRelativeDistinguishedName PROTO ((GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentRelativeDistinguishedName **v, AsnLen *bytesDecoded, int mode)); int GDecComponentRelativeDistinguishedName PROTO ((GenBuf * b, ComponentRelativeDistinguishedName **v, AsnLen *bytesDecoded, int mode)); void FreeComponentRelativeDistinguishedName(ComponentRelativeDistinguishedName *v); typedef ComponentList ComponentRDNSequence; /* SEQUENCE OF RelativeDistinguishedName */ int MatchingComponentRDNSequence PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 )); void* ExtractingComponentRDNSequence PROTO ((ComponentReference *cr, ComponentRDNSequence *comp )); int BDecComponentRDNSequence PROTO ((GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentRDNSequence **v, AsnLen *bytesDecoded, int mode)); int GDecComponentRDNSequence PROTO ((GenBuf * b, ComponentRDNSequence **v, AsnLen *bytesDecoded, int mode)); void FreeComponentRDNSequence(ComponentRDNSequence *v); typedef struct Name /* CHOICE */ { Syntax* syntax; ComponentDesc* comp_desc; struct berval identifier; char id_buf[MAX_IDENTIFIER_LEN]; enum NameChoiceId { NAME_RDNSEQUENCE } choiceId; union NameChoiceUnion { ComponentRDNSequence* rdnSequence; /* RDNSequence */ } a; } ComponentName; int MatchingComponentName PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 )); void* ExtractingComponentName PROTO ((ComponentReference *cr, ComponentName *comp )); int BDecComponentName PROTO ((GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentName **v, AsnLen *bytesDecoded, int mode)); int GDecComponentName PROTO ((GenBuf * b, ComponentName **v, AsnLen *bytesDecoded, int mode)); void FreeComponentName(ComponentName *v); typedef struct TBSCertificate /* SEQUENCE */ { Syntax* syntax; ComponentDesc* comp_desc; struct berval identifier; char id_buf[MAX_IDENTIFIER_LEN]; ComponentVersion* version; /* [0] Version DEFAULT v1 */ ComponentCertificateSerialNumber serialNumber; /* CertificateSerialNumber */ ComponentAlgorithmIdentifier* signature; /* AlgorithmIdentifier */ ComponentName* issuer; /* Name */ ComponentValidity* validity; /* Validity */ ComponentName* subject; /* Name */ ComponentSubjectPublicKeyInfo* subjectPublicKeyInfo; /* SubjectPublicKeyInfo */ ComponentUniqueIdentifier issuerUniqueIdentifier; /* [1] IMPLICIT UniqueIdentifier OPTIONAL */ ComponentUniqueIdentifier subjectUniqueIdentifier; /* [2] IMPLICIT UniqueIdentifier OPTIONAL */ ComponentExtensions* extensions; /* [3] Extensions OPTIONAL */ } ComponentTBSCertificate; int MatchingComponentTBSCertificate PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 )); void* ExtractingComponentTBSCertificate PROTO ((ComponentReference *cr, ComponentTBSCertificate *comp )); int BDecComponentTBSCertificate PROTO ((GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentTBSCertificate **v, AsnLen *bytesDecoded, int mode)); int GDecComponentTBSCertificate PROTO ((GenBuf * b, ComponentTBSCertificate **v, AsnLen *bytesDecoded, int mode)); void FreeComponentTBSCertificate(ComponentTBSCertificate *v); typedef struct Certificate /* SEQUENCE */ { Syntax* syntax; ComponentDesc* comp_desc; struct berval identifier; char id_buf[MAX_IDENTIFIER_LEN]; ComponentTBSCertificate* tbsCertificate; /* TBSCertificate */ ComponentAlgorithmIdentifier* signatureAlgorithm; /* AlgorithmIdentifier */ ComponentBits signature; /* BIT STRING */ } ComponentCertificate; int MatchingComponentCertificate PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 )); void* ExtractingComponentCertificate PROTO ((ComponentReference *cr, ComponentCertificate *comp )); int BDecComponentCertificate PROTO ((GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentCertificate **v, AsnLen *bytesDecoded, int mode)); int GDecComponentCertificate PROTO ((GenBuf * b, ComponentCertificate **v, AsnLen *bytesDecoded, int mode)); void FreeComponentCertificate(ComponentCertificate *v); /* ========== Object Declarations ========== */ /* ========== Object Set Declarations ========== */ #ifdef __cplusplus extern "C" { #endif #endif /* conditional include of certificate.h */