1/* $NetBSD: crl.h,v 1.2 2021/08/14 16:14:51 christos Exp $ */ 2 3 4#include "asn-incl.h" 5/* 6 * crl.h 7 * "CertificateRevokationList" ASN.1 module encode/decode/extracting/matching/free C src. 8 * This file was generated by modified eSMACC compiler Fri Jan 21 11:25:24 2005 9 * The generated files are strongly encouraged to be 10 * compiled as a module for OpenLDAP Software 11 */ 12 13#ifndef _crl_h_ 14#define _crl_h_ 15 16 17 18 19#ifdef __cplusplus 20extern "C" { 21#endif 22#ifdef _WIN32 23#pragma warning( disable : 4101 ) 24#endif 25#include "componentlib.h" 26 27#define V1 0 28#define V2 1 29#define V3 2 30 31typedef ComponentInt ComponentVersion; /* INTEGER { V1 (0), V2 (1), V3 (2) } */ 32 33#define MatchingComponentVersion MatchingComponentInt 34 35#define ExtractingComponentVersion ExtractingComponentInt 36 37#define BDecComponentVersion BDecComponentInt 38 39#define GDecComponentVersion GDecComponentInt 40 41 42typedef ComponentInt ComponentCertificateSerialNumber; /* INTEGER */ 43 44#define MatchingComponentCertificateSerialNumber MatchingComponentInt 45 46#define ExtractingComponentCertificateSerialNumber ExtractingComponentInt 47 48#define BDecComponentCertificateSerialNumber BDecComponentInt 49 50#define GDecComponentCertificateSerialNumber GDecComponentInt 51 52 53typedef ComponentOid ComponentAttributeType; /* OBJECT IDENTIFIER */ 54 55#define MatchingComponentAttributeType MatchingComponentOid 56 57#define ExtractingComponentAttributeType ExtractingComponentOid 58 59#define BDecComponentAttributeType BDecComponentOid 60 61#define GDecComponentAttributeType GDecComponentOid 62 63 64typedef struct AlgorithmIdentifier /* SEQUENCE */ 65{ 66 Syntax* syntax; 67 ComponentDesc* comp_desc; 68 struct berval identifier; 69 char id_buf[MAX_IDENTIFIER_LEN]; 70 ComponentOid algorithm; /* OBJECT IDENTIFIER */ 71 ComponentAnyDefinedBy parameters; /* ANY DEFINED BY algorithm OPTIONAL */ 72} ComponentAlgorithmIdentifier; 73 74int MatchingComponentAlgorithmIdentifier PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 )); 75 76 77void* ExtractingComponentAlgorithmIdentifier PROTO (( void* mem_op, ComponentReference *cr, ComponentAlgorithmIdentifier *comp )); 78 79 80int BDecComponentAlgorithmIdentifier PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentAlgorithmIdentifier **v, AsnLen *bytesDecoded, int mode)); 81 82 83int GDecComponentAlgorithmIdentifier PROTO (( void* mem_op, GenBuf * b, ComponentAlgorithmIdentifier **v, AsnLen *bytesDecoded, int mode)); 84 85 86 87typedef struct Time /* CHOICE */ 88{ 89 Syntax* syntax; 90 ComponentDesc* comp_desc; 91 struct berval identifier; 92 char id_buf[MAX_IDENTIFIER_LEN]; 93 enum TimeChoiceId 94 { 95 TIME_UTCTIME, 96 TIME_GENERALIZEDTIME 97 } choiceId; 98 union TimeChoiceUnion 99 { 100 ComponentUTCTime* utcTime; /* < unknown type id ?! > */ 101 ComponentGeneralizedTime* generalizedTime; /* < unknown type id ?! > */ 102 } a; 103} ComponentTime; 104 105int MatchingComponentTime PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 )); 106 107 108void* ExtractingComponentTime PROTO (( void* mem_op, ComponentReference *cr, ComponentTime *comp )); 109 110 111int BDecComponentTime PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentTime **v, AsnLen *bytesDecoded, int mode)); 112 113 114int GDecComponentTime PROTO (( void* mem_op, GenBuf * b, ComponentTime **v, AsnLen *bytesDecoded, int mode)); 115 116 117 118typedef struct Extension /* SEQUENCE */ 119{ 120 Syntax* syntax; 121 ComponentDesc* comp_desc; 122 struct berval identifier; 123 char id_buf[MAX_IDENTIFIER_LEN]; 124 ComponentOid extnID; /* OBJECT IDENTIFIER */ 125 ComponentBool* critical; /* BOOLEAN DEFAULT FALSE */ 126 ComponentOcts extnValue; /* OCTET STRING */ 127} ComponentExtension; 128 129int MatchingComponentExtension PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 )); 130 131 132void* ExtractingComponentExtension PROTO (( void* mem_op, ComponentReference *cr, ComponentExtension *comp )); 133 134 135int BDecComponentExtension PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentExtension **v, AsnLen *bytesDecoded, int mode)); 136 137 138int GDecComponentExtension PROTO (( void* mem_op, GenBuf * b, ComponentExtension **v, AsnLen *bytesDecoded, int mode)); 139 140 141 142typedef struct AttributeTypeAndValue /* SEQUENCE */ 143{ 144 Syntax* syntax; 145 ComponentDesc* comp_desc; 146 struct berval identifier; 147 char id_buf[MAX_IDENTIFIER_LEN]; 148 ComponentAttributeType type; /* AttributeType */ 149 ComponentAnyDefinedBy value; /* ANY DEFINED BY type */ 150} ComponentAttributeTypeAndValue; 151 152int MatchingComponentAttributeTypeAndValue PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 )); 153 154 155void* ExtractingComponentAttributeTypeAndValue PROTO (( void* mem_op, ComponentReference *cr, ComponentAttributeTypeAndValue *comp )); 156 157 158int BDecComponentAttributeTypeAndValue PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentAttributeTypeAndValue **v, AsnLen *bytesDecoded, int mode)); 159 160 161int GDecComponentAttributeTypeAndValue PROTO (( void* mem_op, GenBuf * b, ComponentAttributeTypeAndValue **v, AsnLen *bytesDecoded, int mode)); 162 163 164 165typedef ComponentList ComponentExtensions; /* SEQUENCE SIZE 1..MAX OF Extension */ 166 167int MatchingComponentExtensions PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 )); 168 169 170void* ExtractingComponentExtensions PROTO (( void* mem_op, ComponentReference *cr, ComponentExtensions *comp )); 171 172 173int BDecComponentExtensions PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentExtensions **v, AsnLen *bytesDecoded, int mode)); 174 175 176int GDecComponentExtensions PROTO (( void* mem_op, GenBuf * b, ComponentExtensions **v, AsnLen *bytesDecoded, int mode)); 177 178 179 180typedef struct TBSCertListSeqOfSeq /* SEQUENCE */ 181{ 182 Syntax* syntax; 183 ComponentDesc* comp_desc; 184 struct berval identifier; 185 char id_buf[MAX_IDENTIFIER_LEN]; 186 ComponentCertificateSerialNumber userCertificate; /* CertificateSerialNumber */ 187 ComponentTime* revocationDate; /* Time */ 188 ComponentExtensions* crlEntryExtensions; /* Extensions OPTIONAL */ 189} ComponentTBSCertListSeqOfSeq; 190 191int MatchingComponentTBSCertListSeqOfSeq PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 )); 192 193 194void* ExtractingComponentTBSCertListSeqOfSeq PROTO (( void* mem_op, ComponentReference *cr, ComponentTBSCertListSeqOfSeq *comp )); 195 196 197int BDecComponentTBSCertListSeqOfSeq PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentTBSCertListSeqOfSeq **v, AsnLen *bytesDecoded, int mode)); 198 199 200int GDecComponentTBSCertListSeqOfSeq PROTO (( void* mem_op, GenBuf * b, ComponentTBSCertListSeqOfSeq **v, AsnLen *bytesDecoded, int mode)); 201 202 203 204typedef ComponentList ComponentTBSCertListSeqOf; /* SEQUENCE OF TBSCertListSeqOfSeq */ 205 206int MatchingComponentTBSCertListSeqOf PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 )); 207 208 209void* ExtractingComponentTBSCertListSeqOf PROTO (( void* mem_op, ComponentReference *cr, ComponentTBSCertListSeqOf *comp )); 210 211 212int BDecComponentTBSCertListSeqOf PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentTBSCertListSeqOf **v, AsnLen *bytesDecoded, int mode)); 213 214 215int GDecComponentTBSCertListSeqOf PROTO (( void* mem_op, GenBuf * b, ComponentTBSCertListSeqOf **v, AsnLen *bytesDecoded, int mode)); 216 217 218 219typedef ComponentList ComponentRelativeDistinguishedName; /* SET OF AttributeTypeAndValue */ 220 221int MatchingComponentRelativeDistinguishedName PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 )); 222 223 224void* ExtractingComponentRelativeDistinguishedName PROTO (( void* mem_op, ComponentReference *cr, ComponentRelativeDistinguishedName *comp )); 225 226 227int BDecComponentRelativeDistinguishedName PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentRelativeDistinguishedName **v, AsnLen *bytesDecoded, int mode)); 228 229 230int GDecComponentRelativeDistinguishedName PROTO (( void* mem_op, GenBuf * b, ComponentRelativeDistinguishedName **v, AsnLen *bytesDecoded, int mode)); 231 232 233 234typedef ComponentList ComponentRDNSequence; /* SEQUENCE OF RelativeDistinguishedName */ 235 236int MatchingComponentRDNSequence PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 )); 237 238 239void* ExtractingComponentRDNSequence PROTO (( void* mem_op, ComponentReference *cr, ComponentRDNSequence *comp )); 240 241 242int BDecComponentRDNSequence PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentRDNSequence **v, AsnLen *bytesDecoded, int mode)); 243 244 245int GDecComponentRDNSequence PROTO (( void* mem_op, GenBuf * b, ComponentRDNSequence **v, AsnLen *bytesDecoded, int mode)); 246 247 248 249typedef struct Name /* CHOICE */ 250{ 251 Syntax* syntax; 252 ComponentDesc* comp_desc; 253 struct berval identifier; 254 char id_buf[MAX_IDENTIFIER_LEN]; 255 enum NameChoiceId 256 { 257 NAME_RDNSEQUENCE 258 } choiceId; 259 union NameChoiceUnion 260 { 261 ComponentRDNSequence* rdnSequence; /* RDNSequence */ 262 } a; 263} ComponentName; 264 265int MatchingComponentName PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 )); 266 267 268void* ExtractingComponentName PROTO (( void* mem_op, ComponentReference *cr, ComponentName *comp )); 269 270 271int BDecComponentName PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentName **v, AsnLen *bytesDecoded, int mode)); 272 273 274int GDecComponentName PROTO (( void* mem_op, GenBuf * b, ComponentName **v, AsnLen *bytesDecoded, int mode)); 275 276 277 278typedef struct TBSCertList /* SEQUENCE */ 279{ 280 Syntax* syntax; 281 ComponentDesc* comp_desc; 282 struct berval identifier; 283 char id_buf[MAX_IDENTIFIER_LEN]; 284 ComponentVersion* version; /* Version OPTIONAL */ 285 ComponentAlgorithmIdentifier* signature; /* AlgorithmIdentifier */ 286 ComponentName* issuer; /* Name */ 287 ComponentTime* thisUpdate; /* Time */ 288 ComponentTime* nextUpdate; /* Time OPTIONAL */ 289 ComponentTBSCertListSeqOf* revokedCertificates; /* TBSCertListSeqOf */ 290 ComponentExtensions* crlExtensions; /* [0] EXPLICIT Extensions OPTIONAL */ 291} ComponentTBSCertList; 292 293int MatchingComponentTBSCertList PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 )); 294 295 296void* ExtractingComponentTBSCertList PROTO (( void* mem_op, ComponentReference *cr, ComponentTBSCertList *comp )); 297 298 299int BDecComponentTBSCertList PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentTBSCertList **v, AsnLen *bytesDecoded, int mode)); 300 301 302int GDecComponentTBSCertList PROTO (( void* mem_op, GenBuf * b, ComponentTBSCertList **v, AsnLen *bytesDecoded, int mode)); 303 304 305 306typedef struct CertificateList /* SEQUENCE */ 307{ 308 Syntax* syntax; 309 ComponentDesc* comp_desc; 310 struct berval identifier; 311 char id_buf[MAX_IDENTIFIER_LEN]; 312 ComponentTBSCertList* tbsCertList; /* TBSCertList */ 313 ComponentAlgorithmIdentifier* signatureAlgorithm; /* AlgorithmIdentifier */ 314 ComponentBits signature; /* BIT STRING */ 315} ComponentCertificateList; 316 317int MatchingComponentCertificateList PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 )); 318 319 320void* ExtractingComponentCertificateList PROTO (( void* mem_op, ComponentReference *cr, ComponentCertificateList *comp )); 321 322 323int BDecComponentCertificateList PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentCertificateList **v, AsnLen *bytesDecoded, int mode)); 324 325 326int GDecComponentCertificateList PROTO (( void* mem_op, GenBuf * b, ComponentCertificateList **v, AsnLen *bytesDecoded, int mode)); 327 328 329 330typedef struct Validity /* SEQUENCE */ 331{ 332 Syntax* syntax; 333 ComponentDesc* comp_desc; 334 struct berval identifier; 335 char id_buf[MAX_IDENTIFIER_LEN]; 336 ComponentTime* notBefore; /* Time */ 337 ComponentTime* notAfter; /* Time */ 338} ComponentValidity; 339 340int MatchingComponentValidity PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 )); 341 342 343void* ExtractingComponentValidity PROTO (( void* mem_op, ComponentReference *cr, ComponentValidity *comp )); 344 345 346int BDecComponentValidity PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentValidity **v, AsnLen *bytesDecoded, int mode)); 347 348 349int GDecComponentValidity PROTO (( void* mem_op, GenBuf * b, ComponentValidity **v, AsnLen *bytesDecoded, int mode)); 350 351 352 353/* ========== Object Declarations ========== */ 354 355 356/* ========== Object Set Declarations ========== */ 357#ifdef __cplusplus 358extern "C" { 359#endif 360 361#endif /* conditional include of crl.h */ 362