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