1 // NOTE: this is a machine generated file--editing not recommended
3 // sm_x509af.h - class definitions for ASN.1 module AuthenticationFramework
5 // This file was generated by snacc on Mon Apr 22 22:34:19 2002
6 // UBC snacc by Mike Sample
7 // A couple of enhancements made by IBM European Networking Center
13 //------------------------------------------------------------------------------
14 // class declarations:
17 class AttributeCertificateAssertionSetOf
;
18 class AttributeCertificateInfoSeqOf
;
19 class AlgorithmIdentifier
;
22 class AttCertValidityPeriod
;
24 class SubjectPublicKeyInfo
;
27 class AttributeCertificateAssertionChoice
;
28 class AttributeCertificateInfoChoice
;
29 class CRLToSignSeqOfSeq
;
31 class CertificateToSign
;
33 class AttributeCertificateInfo
;
35 class CrossCertificates
;
36 class CertificatePair
;
37 class CertificateList
;
38 class AttributeCertificate
;
39 class CertificationPathSeqOf
;
40 class ForwardCertificationPath
;
42 class AttributeCertificationPathSeqOf
;
44 class CertificationPath
;
45 class AttributeCertificationPath
;
46 class AttributeCertificateAssertion
;
48 //------------------------------------------------------------------------------
51 typedef enum AuthenticationFrameworkAnyId
54 } AuthenticationFrameworkAnyId
;
57 /* INTEGER { v1 (0), v2 (1), v3 (2) } */
58 class Version
: public AsnInt
61 Version(): AsnInt() {}
62 Version (int i
): AsnInt (i
) {}
72 /* OCTET STRING (SIZE (0..ub-password-length)) */
73 typedef AsnOcts UserPassword
;
75 class AttributeCertificateAssertionSetOf
: public AsnType
78 unsigned long int count
;
84 } *first
, *curr
, *last
;
87 AttributeCertificateAssertionSetOf() { count
= 0; first
= curr
= last
= NULL
; }
88 AttributeCertificateAssertionSetOf (const AttributeCertificateAssertionSetOf
&);
89 virtual ~AttributeCertificateAssertionSetOf();
90 virtual AsnType
*Clone() const;
92 virtual AsnType
*Copy() const;
94 AttributeCertificateAssertionSetOf
&operator = (const AttributeCertificateAssertionSetOf
&);
95 void SetCurrElmt (unsigned long int index
);
96 unsigned long int GetCurrElmtIndex();
97 void SetCurrToFirst() { curr
= first
; }
98 void SetCurrToLast() { curr
= last
; }
99 // reading member fcns
100 int Count() const { return count
; }
101 // NOTE: if your compiler complains about these NULLs, its definition of NULL is broken (and you better change it there!)
102 AttributeType
*First() const { return count
> 0 ? first
->elmt
: NULL
; }
103 AttributeType
*Last() const { return count
> 0 ? last
->elmt
: NULL
; }
104 AttributeType
*Curr() const { return curr
? curr
->elmt
: NULL
; }
105 AttributeType
*Next() const { return curr
&& curr
->next
? curr
->next
->elmt
: NULL
; }
106 AttributeType
*Prev() const { return curr
&& curr
->prev
? curr
->prev
->elmt
: NULL
; }
108 // routines that move the curr elmt
109 AttributeType
*GoNext() { if (curr
) curr
= curr
->next
; return Curr(); }
110 AttributeType
*GoPrev() { if (curr
) curr
= curr
->prev
; return Curr(); }
112 // write & alloc fcns - returns new elmt
113 AttributeType
*Append(); // add elmt to end of list
114 AttributeType
*Prepend(); // add elmt to beginning of list
115 AttributeType
*InsertBefore(); //insert elmt before current elmt
116 AttributeType
*InsertAfter(); //insert elmt after current elmt
118 // write & alloc & copy - returns list after copying elmt
119 AttributeCertificateAssertionSetOf
&AppendCopy (AttributeType
&elmt
); // add elmt to end of list
120 AttributeCertificateAssertionSetOf
&PrependCopy (AttributeType
&elmt
); // add elmt to beginning of list
121 AttributeCertificateAssertionSetOf
&InsertBeforeAndCopy (AttributeType
&elmt
); //insert elmt before current elmt
122 AttributeCertificateAssertionSetOf
&InsertAfterAndCopy (AttributeType
&elmt
); //insert elmt after current elmt
124 // removing the current elmt from the list
125 void RemoveCurrFromList();
127 // encode and decode routines
128 AsnLen
BEnc (BUF_TYPE b
);
129 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
130 AsnLen
BEncContent (BUF_TYPE b
);
131 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
134 void Print (ostream
&os
) const;
138 class AttributeCertificateInfoSeqOf
: public AsnType
141 unsigned long int count
;
147 } *first
, *curr
, *last
;
150 AttributeCertificateInfoSeqOf() { count
= 0; first
= curr
= last
= NULL
; }
151 AttributeCertificateInfoSeqOf (const AttributeCertificateInfoSeqOf
&);
152 virtual ~AttributeCertificateInfoSeqOf();
153 virtual AsnType
*Clone() const;
155 virtual AsnType
*Copy() const;
157 AttributeCertificateInfoSeqOf
&operator = (const AttributeCertificateInfoSeqOf
&);
158 void SetCurrElmt (unsigned long int index
);
159 unsigned long int GetCurrElmtIndex();
160 void SetCurrToFirst() { curr
= first
; }
161 void SetCurrToLast() { curr
= last
; }
162 // reading member fcns
163 int Count() const { return count
; }
164 // NOTE: if your compiler complains about these NULLs, its definition of NULL is broken (and you better change it there!)
165 Attribute
*First() const { return count
> 0 ? first
->elmt
: NULL
; }
166 Attribute
*Last() const { return count
> 0 ? last
->elmt
: NULL
; }
167 Attribute
*Curr() const { return curr
? curr
->elmt
: NULL
; }
168 Attribute
*Next() const { return curr
&& curr
->next
? curr
->next
->elmt
: NULL
; }
169 Attribute
*Prev() const { return curr
&& curr
->prev
? curr
->prev
->elmt
: NULL
; }
171 // routines that move the curr elmt
172 Attribute
*GoNext() { if (curr
) curr
= curr
->next
; return Curr(); }
173 Attribute
*GoPrev() { if (curr
) curr
= curr
->prev
; return Curr(); }
175 // write & alloc fcns - returns new elmt
176 Attribute
*Append(); // add elmt to end of list
177 Attribute
*Prepend(); // add elmt to beginning of list
178 Attribute
*InsertBefore(); //insert elmt before current elmt
179 Attribute
*InsertAfter(); //insert elmt after current elmt
181 // write & alloc & copy - returns list after copying elmt
182 AttributeCertificateInfoSeqOf
&AppendCopy (Attribute
&elmt
); // add elmt to end of list
183 AttributeCertificateInfoSeqOf
&PrependCopy (Attribute
&elmt
); // add elmt to beginning of list
184 AttributeCertificateInfoSeqOf
&InsertBeforeAndCopy (Attribute
&elmt
); //insert elmt before current elmt
185 AttributeCertificateInfoSeqOf
&InsertAfterAndCopy (Attribute
&elmt
); //insert elmt after current elmt
187 // removing the current elmt from the list
188 void RemoveCurrFromList();
190 // encode and decode routines
191 AsnLen
BEnc (BUF_TYPE b
);
192 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
193 AsnLen
BEncContent (BUF_TYPE b
);
194 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
197 void Print (ostream
&os
) const;
202 typedef BigIntegerStr CertificateSerialNumber
;
204 class AlgorithmIdentifier
: public AsnType
210 AlgorithmIdentifier();
211 AlgorithmIdentifier (const AlgorithmIdentifier
&);
212 virtual ~AlgorithmIdentifier();
213 virtual AsnType
*Clone() const;
215 virtual AsnType
*Copy() const;
217 AlgorithmIdentifier
&operator = (const AlgorithmIdentifier
&);
218 AsnLen
BEncContent (BUF_TYPE b
);
219 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
221 AsnLen
BEnc (BUF_TYPE b
);
222 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
223 void Print (ostream
&os
) const;
227 class Time
: public AsnType
233 generalizedTimeCid
= 1
236 enum ChoiceIdEnum choiceId
;
240 GeneralizedTime
*generalizedTime
;
248 virtual AsnType
*Clone() const;
250 virtual AsnType
*Copy() const;
252 Time
&operator = (const Time
&);
253 AsnLen
BEncContent (BUF_TYPE b
);
254 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
255 AsnLen
BEnc (BUF_TYPE b
);
256 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
257 void Print (ostream
&os
) const;
261 class Extension
: public AsnType
269 Extension (const Extension
&);
270 virtual ~Extension();
271 virtual AsnType
*Clone() const;
273 virtual AsnType
*Copy() const;
275 Extension
&operator = (const Extension
&);
276 AsnLen
BEncContent (BUF_TYPE b
);
277 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
279 AsnLen
BEnc (BUF_TYPE b
);
280 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
281 void Print (ostream
&os
) const;
285 class AttCertValidityPeriod
: public AsnType
288 GeneralizedTime notBeforeTime
;
289 GeneralizedTime notAfterTime
;
291 AttCertValidityPeriod();
292 AttCertValidityPeriod (const AttCertValidityPeriod
&);
293 virtual ~AttCertValidityPeriod();
294 virtual AsnType
*Clone() const;
296 virtual AsnType
*Copy() const;
298 AttCertValidityPeriod
&operator = (const AttCertValidityPeriod
&);
299 AsnLen
BEncContent (BUF_TYPE b
);
300 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
302 AsnLen
BEnc (BUF_TYPE b
);
303 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
304 void Print (ostream
&os
) const;
308 class Validity
: public AsnType
315 Validity (const Validity
&);
317 virtual AsnType
*Clone() const;
319 virtual AsnType
*Copy() const;
321 Validity
&operator = (const Validity
&);
322 AsnLen
BEncContent (BUF_TYPE b
);
323 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
325 AsnLen
BEnc (BUF_TYPE b
);
326 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
327 void Print (ostream
&os
) const;
331 class SubjectPublicKeyInfo
: public AsnType
334 AlgorithmIdentifier
*algorithm
;
335 AsnBits subjectPublicKey
;
337 SubjectPublicKeyInfo();
338 SubjectPublicKeyInfo (const SubjectPublicKeyInfo
&);
339 virtual ~SubjectPublicKeyInfo();
340 virtual AsnType
*Clone() const;
342 virtual AsnType
*Copy() const;
344 SubjectPublicKeyInfo
&operator = (const SubjectPublicKeyInfo
&);
345 AsnLen
BEncContent (BUF_TYPE b
);
346 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
348 AsnLen
BEnc (BUF_TYPE b
);
349 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
350 void Print (ostream
&os
) const;
354 class Extensions
: public AsnType
357 unsigned long int count
;
363 } *first
, *curr
, *last
;
366 Extensions() { count
= 0; first
= curr
= last
= NULL
; }
367 Extensions (const Extensions
&);
368 virtual ~Extensions();
369 virtual AsnType
*Clone() const;
371 virtual AsnType
*Copy() const;
373 Extensions
&operator = (const Extensions
&);
374 void SetCurrElmt (unsigned long int index
);
375 unsigned long int GetCurrElmtIndex();
376 void SetCurrToFirst() { curr
= first
; }
377 void SetCurrToLast() { curr
= last
; }
378 // reading member fcns
379 int Count() const { return count
; }
380 // NOTE: if your compiler complains about these NULLs, its definition of NULL is broken (and you better change it there!)
381 Extension
*First() const { return count
> 0 ? first
->elmt
: NULL
; }
382 Extension
*Last() const { return count
> 0 ? last
->elmt
: NULL
; }
383 Extension
*Curr() const { return curr
? curr
->elmt
: NULL
; }
384 Extension
*Next() const { return curr
&& curr
->next
? curr
->next
->elmt
: NULL
; }
385 Extension
*Prev() const { return curr
&& curr
->prev
? curr
->prev
->elmt
: NULL
; }
387 // routines that move the curr elmt
388 Extension
*GoNext() { if (curr
) curr
= curr
->next
; return Curr(); }
389 Extension
*GoPrev() { if (curr
) curr
= curr
->prev
; return Curr(); }
391 // write & alloc fcns - returns new elmt
392 Extension
*Append(); // add elmt to end of list
393 Extension
*Prepend(); // add elmt to beginning of list
394 Extension
*InsertBefore(); //insert elmt before current elmt
395 Extension
*InsertAfter(); //insert elmt after current elmt
397 // write & alloc & copy - returns list after copying elmt
398 Extensions
&AppendCopy (Extension
&elmt
); // add elmt to end of list
399 Extensions
&PrependCopy (Extension
&elmt
); // add elmt to beginning of list
400 Extensions
&InsertBeforeAndCopy (Extension
&elmt
); //insert elmt before current elmt
401 Extensions
&InsertAfterAndCopy (Extension
&elmt
); //insert elmt after current elmt
403 // removing the current elmt from the list
404 void RemoveCurrFromList();
406 // encode and decode routines
407 AsnLen
BEnc (BUF_TYPE b
);
408 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
409 AsnLen
BEncContent (BUF_TYPE b
);
410 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
413 void Print (ostream
&os
) const;
417 class IssuerSerial
: public AsnType
421 CertificateSerialNumber serial
;
422 UniqueIdentifier
*issuerUID
;
425 IssuerSerial (const IssuerSerial
&);
426 virtual ~IssuerSerial();
427 virtual AsnType
*Clone() const;
429 virtual AsnType
*Copy() const;
431 IssuerSerial
&operator = (const IssuerSerial
&);
432 AsnLen
BEncContent (BUF_TYPE b
);
433 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
435 AsnLen
BEnc (BUF_TYPE b
);
436 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
437 void Print (ostream
&os
) const;
441 class AttributeCertificateAssertionChoice
: public AsnType
446 baseCertificateIDCid
= 0,
450 enum ChoiceIdEnum choiceId
;
453 IssuerSerial
*baseCertificateID
;
458 AttributeCertificateAssertionChoice();
459 AttributeCertificateAssertionChoice (const AttributeCertificateAssertionChoice
&);
460 virtual ~AttributeCertificateAssertionChoice();
462 virtual AsnType
*Clone() const;
464 virtual AsnType
*Copy() const;
466 AttributeCertificateAssertionChoice
&operator = (const AttributeCertificateAssertionChoice
&);
467 AsnLen
BEncContent (BUF_TYPE b
);
468 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
469 AsnLen
BEnc (BUF_TYPE b
);
470 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
471 void Print (ostream
&os
) const;
475 class AttributeCertificateInfoChoice
: public AsnType
480 baseCertificateIDCid
= 0,
484 enum ChoiceIdEnum choiceId
;
487 IssuerSerial
*baseCertificateID
;
488 GeneralNames
*subjectName
;
492 AttributeCertificateInfoChoice();
493 AttributeCertificateInfoChoice (const AttributeCertificateInfoChoice
&);
494 virtual ~AttributeCertificateInfoChoice();
496 virtual AsnType
*Clone() const;
498 virtual AsnType
*Copy() const;
500 AttributeCertificateInfoChoice
&operator = (const AttributeCertificateInfoChoice
&);
501 AsnLen
BEncContent (BUF_TYPE b
);
502 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
503 AsnLen
BEnc (BUF_TYPE b
);
504 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
505 void Print (ostream
&os
) const;
509 class CRLToSignSeqOfSeq
: public AsnType
512 CertificateSerialNumber userCertificate
;
513 Time
*revocationDate
;
514 Extensions
*crlEntryExtensions
;
517 CRLToSignSeqOfSeq (const CRLToSignSeqOfSeq
&);
518 virtual ~CRLToSignSeqOfSeq();
519 virtual AsnType
*Clone() const;
521 virtual AsnType
*Copy() const;
523 CRLToSignSeqOfSeq
&operator = (const CRLToSignSeqOfSeq
&);
524 AsnLen
BEncContent (BUF_TYPE b
);
525 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
527 AsnLen
BEnc (BUF_TYPE b
);
528 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
529 void Print (ostream
&os
) const;
533 class CRLToSignSeqOf
: public AsnType
536 unsigned long int count
;
541 CRLToSignSeqOfSeq
*elmt
;
542 } *first
, *curr
, *last
;
545 CRLToSignSeqOf() { count
= 0; first
= curr
= last
= NULL
; }
546 CRLToSignSeqOf (const CRLToSignSeqOf
&);
547 virtual ~CRLToSignSeqOf();
548 virtual AsnType
*Clone() const;
550 virtual AsnType
*Copy() const;
552 CRLToSignSeqOf
&operator = (const CRLToSignSeqOf
&);
553 void SetCurrElmt (unsigned long int index
);
554 unsigned long int GetCurrElmtIndex();
555 void SetCurrToFirst() { curr
= first
; }
556 void SetCurrToLast() { curr
= last
; }
557 // reading member fcns
558 int Count() const { return count
; }
559 // NOTE: if your compiler complains about these NULLs, its definition of NULL is broken (and you better change it there!)
560 CRLToSignSeqOfSeq
*First() const { return count
> 0 ? first
->elmt
: NULL
; }
561 CRLToSignSeqOfSeq
*Last() const { return count
> 0 ? last
->elmt
: NULL
; }
562 CRLToSignSeqOfSeq
*Curr() const { return curr
? curr
->elmt
: NULL
; }
563 CRLToSignSeqOfSeq
*Next() const { return curr
&& curr
->next
? curr
->next
->elmt
: NULL
; }
564 CRLToSignSeqOfSeq
*Prev() const { return curr
&& curr
->prev
? curr
->prev
->elmt
: NULL
; }
566 // routines that move the curr elmt
567 CRLToSignSeqOfSeq
*GoNext() { if (curr
) curr
= curr
->next
; return Curr(); }
568 CRLToSignSeqOfSeq
*GoPrev() { if (curr
) curr
= curr
->prev
; return Curr(); }
570 // write & alloc fcns - returns new elmt
571 CRLToSignSeqOfSeq
*Append(); // add elmt to end of list
572 CRLToSignSeqOfSeq
*Prepend(); // add elmt to beginning of list
573 CRLToSignSeqOfSeq
*InsertBefore(); //insert elmt before current elmt
574 CRLToSignSeqOfSeq
*InsertAfter(); //insert elmt after current elmt
576 // write & alloc & copy - returns list after copying elmt
577 CRLToSignSeqOf
&AppendCopy (CRLToSignSeqOfSeq
&elmt
); // add elmt to end of list
578 CRLToSignSeqOf
&PrependCopy (CRLToSignSeqOfSeq
&elmt
); // add elmt to beginning of list
579 CRLToSignSeqOf
&InsertBeforeAndCopy (CRLToSignSeqOfSeq
&elmt
); //insert elmt before current elmt
580 CRLToSignSeqOf
&InsertAfterAndCopy (CRLToSignSeqOfSeq
&elmt
); //insert elmt after current elmt
582 // removing the current elmt from the list
583 void RemoveCurrFromList();
585 // encode and decode routines
586 AsnLen
BEnc (BUF_TYPE b
);
587 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
588 AsnLen
BEncContent (BUF_TYPE b
);
589 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
592 void Print (ostream
&os
) const;
596 class CertificateToSign
: public AsnType
600 CertificateSerialNumber serialNumber
;
601 AlgorithmIdentifier
*signature
;
605 SubjectPublicKeyInfo
*subjectPublicKeyInfo
;
606 UniqueIdentifier
*issuerUniqueIdentifier
;
607 UniqueIdentifier
*subjectUniqueIdentifier
;
608 Extensions
*extensions
;
611 CertificateToSign (const CertificateToSign
&);
612 virtual ~CertificateToSign();
613 virtual AsnType
*Clone() const;
615 virtual AsnType
*Copy() const;
617 CertificateToSign
&operator = (const CertificateToSign
&);
618 AsnLen
BEncContent (BUF_TYPE b
);
619 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
621 AsnLen
BEnc (BUF_TYPE b
);
622 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
623 void Print (ostream
&os
) const;
627 class CRLToSign
: public AsnType
631 AlgorithmIdentifier
*signature
;
635 CRLToSignSeqOf
*revokedCertificates
;
636 Extensions
*crlExtensions
;
639 CRLToSign (const CRLToSign
&);
640 virtual ~CRLToSign();
641 virtual AsnType
*Clone() const;
643 virtual AsnType
*Copy() const;
645 CRLToSign
&operator = (const CRLToSign
&);
646 AsnLen
BEncContent (BUF_TYPE b
);
647 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
649 AsnLen
BEnc (BUF_TYPE b
);
650 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
651 void Print (ostream
&os
) const;
655 class AttributeCertificateInfo
: public AsnType
659 AttributeCertificateInfoChoice
*subject
;
661 AlgorithmIdentifier
*signature
;
662 CertificateSerialNumber serialNumber
;
663 AttCertValidityPeriod
*attCertValidityPeriod
;
664 AttributeCertificateInfoSeqOf attributes
;
665 UniqueIdentifier
*issuerUniqueID
;
666 Extensions
*extensions
;
668 AttributeCertificateInfo();
669 AttributeCertificateInfo (const AttributeCertificateInfo
&);
670 virtual ~AttributeCertificateInfo();
671 virtual AsnType
*Clone() const;
673 virtual AsnType
*Copy() const;
675 AttributeCertificateInfo
&operator = (const AttributeCertificateInfo
&);
676 AsnLen
BEncContent (BUF_TYPE b
);
677 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
679 AsnLen
BEnc (BUF_TYPE b
);
680 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
681 void Print (ostream
&os
) const;
685 class Certificate
: public AsnType
688 CertificateToSign
*certificateToSign
;
689 AlgorithmIdentifier
*algorithmIdentifier
;
690 AsnBits signatureValue
;
693 Certificate (const Certificate
&);
694 virtual ~Certificate();
695 virtual AsnType
*Clone() const;
697 virtual AsnType
*Copy() const;
699 Certificate
&operator = (const Certificate
&);
700 AsnLen
BEncContent (BUF_TYPE b
);
701 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
703 AsnLen
BEnc (BUF_TYPE b
);
704 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
705 void Print (ostream
&os
) const;
709 class CrossCertificates
: public AsnType
712 unsigned long int count
;
718 } *first
, *curr
, *last
;
721 CrossCertificates() { count
= 0; first
= curr
= last
= NULL
; }
722 CrossCertificates (const CrossCertificates
&);
723 virtual ~CrossCertificates();
724 virtual AsnType
*Clone() const;
726 virtual AsnType
*Copy() const;
728 CrossCertificates
&operator = (const CrossCertificates
&);
729 void SetCurrElmt (unsigned long int index
);
730 unsigned long int GetCurrElmtIndex();
731 void SetCurrToFirst() { curr
= first
; }
732 void SetCurrToLast() { curr
= last
; }
733 // reading member fcns
734 int Count() const { return count
; }
735 // NOTE: if your compiler complains about these NULLs, its definition of NULL is broken (and you better change it there!)
736 Certificate
*First() const { return count
> 0 ? first
->elmt
: NULL
; }
737 Certificate
*Last() const { return count
> 0 ? last
->elmt
: NULL
; }
738 Certificate
*Curr() const { return curr
? curr
->elmt
: NULL
; }
739 Certificate
*Next() const { return curr
&& curr
->next
? curr
->next
->elmt
: NULL
; }
740 Certificate
*Prev() const { return curr
&& curr
->prev
? curr
->prev
->elmt
: NULL
; }
742 // routines that move the curr elmt
743 Certificate
*GoNext() { if (curr
) curr
= curr
->next
; return Curr(); }
744 Certificate
*GoPrev() { if (curr
) curr
= curr
->prev
; return Curr(); }
746 // write & alloc fcns - returns new elmt
747 Certificate
*Append(); // add elmt to end of list
748 Certificate
*Prepend(); // add elmt to beginning of list
749 Certificate
*InsertBefore(); //insert elmt before current elmt
750 Certificate
*InsertAfter(); //insert elmt after current elmt
752 // write & alloc & copy - returns list after copying elmt
753 CrossCertificates
&AppendCopy (Certificate
&elmt
); // add elmt to end of list
754 CrossCertificates
&PrependCopy (Certificate
&elmt
); // add elmt to beginning of list
755 CrossCertificates
&InsertBeforeAndCopy (Certificate
&elmt
); //insert elmt before current elmt
756 CrossCertificates
&InsertAfterAndCopy (Certificate
&elmt
); //insert elmt after current elmt
758 // removing the current elmt from the list
759 void RemoveCurrFromList();
761 // encode and decode routines
762 AsnLen
BEnc (BUF_TYPE b
);
763 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
764 AsnLen
BEncContent (BUF_TYPE b
);
765 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
768 void Print (ostream
&os
) const;
772 class CertificatePair
: public AsnType
775 Certificate
*forward
;
776 Certificate
*reverse
;
779 CertificatePair (const CertificatePair
&);
780 virtual ~CertificatePair();
781 virtual AsnType
*Clone() const;
783 virtual AsnType
*Copy() const;
785 CertificatePair
&operator = (const CertificatePair
&);
786 AsnLen
BEncContent (BUF_TYPE b
);
787 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
789 AsnLen
BEnc (BUF_TYPE b
);
790 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
791 void Print (ostream
&os
) const;
795 class CertificateList
: public AsnType
798 CRLToSign
*crlToSign
;
799 AlgorithmIdentifier
*algorithmIdentifier
;
800 AsnBits signatureValue
;
803 CertificateList (const CertificateList
&);
804 virtual ~CertificateList();
805 virtual AsnType
*Clone() const;
807 virtual AsnType
*Copy() const;
809 CertificateList
&operator = (const CertificateList
&);
810 AsnLen
BEncContent (BUF_TYPE b
);
811 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
813 AsnLen
BEnc (BUF_TYPE b
);
814 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
815 void Print (ostream
&os
) const;
819 class AttributeCertificate
: public AsnType
822 AttributeCertificateInfo
*attributeCertificateInfo
;
823 AlgorithmIdentifier
*algorithmIdentifier
;
824 AsnBits signatureValue
;
826 AttributeCertificate();
827 AttributeCertificate (const AttributeCertificate
&);
828 virtual ~AttributeCertificate();
829 virtual AsnType
*Clone() const;
831 virtual AsnType
*Copy() const;
833 AttributeCertificate
&operator = (const AttributeCertificate
&);
834 AsnLen
BEncContent (BUF_TYPE b
);
835 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
837 AsnLen
BEnc (BUF_TYPE b
);
838 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
839 void Print (ostream
&os
) const;
843 class CertificationPathSeqOf
: public AsnType
846 unsigned long int count
;
851 CertificatePair
*elmt
;
852 } *first
, *curr
, *last
;
855 CertificationPathSeqOf() { count
= 0; first
= curr
= last
= NULL
; }
856 CertificationPathSeqOf (const CertificationPathSeqOf
&);
857 virtual ~CertificationPathSeqOf();
858 virtual AsnType
*Clone() const;
860 virtual AsnType
*Copy() const;
862 CertificationPathSeqOf
&operator = (const CertificationPathSeqOf
&);
863 void SetCurrElmt (unsigned long int index
);
864 unsigned long int GetCurrElmtIndex();
865 void SetCurrToFirst() { curr
= first
; }
866 void SetCurrToLast() { curr
= last
; }
867 // reading member fcns
868 int Count() const { return count
; }
869 // NOTE: if your compiler complains about these NULLs, its definition of NULL is broken (and you better change it there!)
870 CertificatePair
*First() const { return count
> 0 ? first
->elmt
: NULL
; }
871 CertificatePair
*Last() const { return count
> 0 ? last
->elmt
: NULL
; }
872 CertificatePair
*Curr() const { return curr
? curr
->elmt
: NULL
; }
873 CertificatePair
*Next() const { return curr
&& curr
->next
? curr
->next
->elmt
: NULL
; }
874 CertificatePair
*Prev() const { return curr
&& curr
->prev
? curr
->prev
->elmt
: NULL
; }
876 // routines that move the curr elmt
877 CertificatePair
*GoNext() { if (curr
) curr
= curr
->next
; return Curr(); }
878 CertificatePair
*GoPrev() { if (curr
) curr
= curr
->prev
; return Curr(); }
880 // write & alloc fcns - returns new elmt
881 CertificatePair
*Append(); // add elmt to end of list
882 CertificatePair
*Prepend(); // add elmt to beginning of list
883 CertificatePair
*InsertBefore(); //insert elmt before current elmt
884 CertificatePair
*InsertAfter(); //insert elmt after current elmt
886 // write & alloc & copy - returns list after copying elmt
887 CertificationPathSeqOf
&AppendCopy (CertificatePair
&elmt
); // add elmt to end of list
888 CertificationPathSeqOf
&PrependCopy (CertificatePair
&elmt
); // add elmt to beginning of list
889 CertificationPathSeqOf
&InsertBeforeAndCopy (CertificatePair
&elmt
); //insert elmt before current elmt
890 CertificationPathSeqOf
&InsertAfterAndCopy (CertificatePair
&elmt
); //insert elmt after current elmt
892 // removing the current elmt from the list
893 void RemoveCurrFromList();
895 // encode and decode routines
896 AsnLen
BEnc (BUF_TYPE b
);
897 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
898 AsnLen
BEncContent (BUF_TYPE b
);
899 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
902 void Print (ostream
&os
) const;
906 class ForwardCertificationPath
: public AsnType
909 unsigned long int count
;
914 CrossCertificates
*elmt
;
915 } *first
, *curr
, *last
;
918 ForwardCertificationPath() { count
= 0; first
= curr
= last
= NULL
; }
919 ForwardCertificationPath (const ForwardCertificationPath
&);
920 virtual ~ForwardCertificationPath();
921 virtual AsnType
*Clone() const;
923 virtual AsnType
*Copy() const;
925 ForwardCertificationPath
&operator = (const ForwardCertificationPath
&);
926 void SetCurrElmt (unsigned long int index
);
927 unsigned long int GetCurrElmtIndex();
928 void SetCurrToFirst() { curr
= first
; }
929 void SetCurrToLast() { curr
= last
; }
930 // reading member fcns
931 int Count() const { return count
; }
932 // NOTE: if your compiler complains about these NULLs, its definition of NULL is broken (and you better change it there!)
933 CrossCertificates
*First() const { return count
> 0 ? first
->elmt
: NULL
; }
934 CrossCertificates
*Last() const { return count
> 0 ? last
->elmt
: NULL
; }
935 CrossCertificates
*Curr() const { return curr
? curr
->elmt
: NULL
; }
936 CrossCertificates
*Next() const { return curr
&& curr
->next
? curr
->next
->elmt
: NULL
; }
937 CrossCertificates
*Prev() const { return curr
&& curr
->prev
? curr
->prev
->elmt
: NULL
; }
939 // routines that move the curr elmt
940 CrossCertificates
*GoNext() { if (curr
) curr
= curr
->next
; return Curr(); }
941 CrossCertificates
*GoPrev() { if (curr
) curr
= curr
->prev
; return Curr(); }
943 // write & alloc fcns - returns new elmt
944 CrossCertificates
*Append(); // add elmt to end of list
945 CrossCertificates
*Prepend(); // add elmt to beginning of list
946 CrossCertificates
*InsertBefore(); //insert elmt before current elmt
947 CrossCertificates
*InsertAfter(); //insert elmt after current elmt
949 // write & alloc & copy - returns list after copying elmt
950 ForwardCertificationPath
&AppendCopy (CrossCertificates
&elmt
); // add elmt to end of list
951 ForwardCertificationPath
&PrependCopy (CrossCertificates
&elmt
); // add elmt to beginning of list
952 ForwardCertificationPath
&InsertBeforeAndCopy (CrossCertificates
&elmt
); //insert elmt before current elmt
953 ForwardCertificationPath
&InsertAfterAndCopy (CrossCertificates
&elmt
); //insert elmt after current elmt
955 // removing the current elmt from the list
956 void RemoveCurrFromList();
958 // encode and decode routines
959 AsnLen
BEnc (BUF_TYPE b
);
960 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
961 AsnLen
BEncContent (BUF_TYPE b
);
962 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
965 void Print (ostream
&os
) const;
969 class ACPathData
: public AsnType
972 Certificate
*certificate
;
973 AttributeCertificate
*attributeCertificate
;
976 ACPathData (const ACPathData
&);
977 virtual ~ACPathData();
978 virtual AsnType
*Clone() const;
980 virtual AsnType
*Copy() const;
982 ACPathData
&operator = (const ACPathData
&);
983 AsnLen
BEncContent (BUF_TYPE b
);
984 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
986 AsnLen
BEnc (BUF_TYPE b
);
987 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
988 void Print (ostream
&os
) const;
992 class AttributeCertificationPathSeqOf
: public AsnType
995 unsigned long int count
;
1001 } *first
, *curr
, *last
;
1004 AttributeCertificationPathSeqOf() { count
= 0; first
= curr
= last
= NULL
; }
1005 AttributeCertificationPathSeqOf (const AttributeCertificationPathSeqOf
&);
1006 virtual ~AttributeCertificationPathSeqOf();
1007 virtual AsnType
*Clone() const;
1009 virtual AsnType
*Copy() const;
1011 AttributeCertificationPathSeqOf
&operator = (const AttributeCertificationPathSeqOf
&);
1012 void SetCurrElmt (unsigned long int index
);
1013 unsigned long int GetCurrElmtIndex();
1014 void SetCurrToFirst() { curr
= first
; }
1015 void SetCurrToLast() { curr
= last
; }
1016 // reading member fcns
1017 int Count() const { return count
; }
1018 // NOTE: if your compiler complains about these NULLs, its definition of NULL is broken (and you better change it there!)
1019 ACPathData
*First() const { return count
> 0 ? first
->elmt
: NULL
; }
1020 ACPathData
*Last() const { return count
> 0 ? last
->elmt
: NULL
; }
1021 ACPathData
*Curr() const { return curr
? curr
->elmt
: NULL
; }
1022 ACPathData
*Next() const { return curr
&& curr
->next
? curr
->next
->elmt
: NULL
; }
1023 ACPathData
*Prev() const { return curr
&& curr
->prev
? curr
->prev
->elmt
: NULL
; }
1025 // routines that move the curr elmt
1026 ACPathData
*GoNext() { if (curr
) curr
= curr
->next
; return Curr(); }
1027 ACPathData
*GoPrev() { if (curr
) curr
= curr
->prev
; return Curr(); }
1029 // write & alloc fcns - returns new elmt
1030 ACPathData
*Append(); // add elmt to end of list
1031 ACPathData
*Prepend(); // add elmt to beginning of list
1032 ACPathData
*InsertBefore(); //insert elmt before current elmt
1033 ACPathData
*InsertAfter(); //insert elmt after current elmt
1035 // write & alloc & copy - returns list after copying elmt
1036 AttributeCertificationPathSeqOf
&AppendCopy (ACPathData
&elmt
); // add elmt to end of list
1037 AttributeCertificationPathSeqOf
&PrependCopy (ACPathData
&elmt
); // add elmt to beginning of list
1038 AttributeCertificationPathSeqOf
&InsertBeforeAndCopy (ACPathData
&elmt
); //insert elmt before current elmt
1039 AttributeCertificationPathSeqOf
&InsertAfterAndCopy (ACPathData
&elmt
); //insert elmt after current elmt
1041 // removing the current elmt from the list
1042 void RemoveCurrFromList();
1044 // encode and decode routines
1045 AsnLen
BEnc (BUF_TYPE b
);
1046 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
1047 AsnLen
BEncContent (BUF_TYPE b
);
1048 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
1051 void Print (ostream
&os
) const;
1055 class Certificates
: public AsnType
1058 Certificate
*userCertificate
;
1059 ForwardCertificationPath
*certificationPath
;
1062 Certificates (const Certificates
&);
1063 virtual ~Certificates();
1064 virtual AsnType
*Clone() const;
1066 virtual AsnType
*Copy() const;
1068 Certificates
&operator = (const Certificates
&);
1069 AsnLen
BEncContent (BUF_TYPE b
);
1070 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
1072 AsnLen
BEnc (BUF_TYPE b
);
1073 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
1074 void Print (ostream
&os
) const;
1078 class CertificationPath
: public AsnType
1081 Certificate
*userCertificate
;
1082 CertificationPathSeqOf
*theCACertificates
;
1084 CertificationPath();
1085 CertificationPath (const CertificationPath
&);
1086 virtual ~CertificationPath();
1087 virtual AsnType
*Clone() const;
1089 virtual AsnType
*Copy() const;
1091 CertificationPath
&operator = (const CertificationPath
&);
1092 AsnLen
BEncContent (BUF_TYPE b
);
1093 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
1095 AsnLen
BEnc (BUF_TYPE b
);
1096 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
1097 void Print (ostream
&os
) const;
1101 class AttributeCertificationPath
: public AsnType
1104 AttributeCertificate
*attributeCertificate
;
1105 AttributeCertificationPathSeqOf
*acPath
;
1107 AttributeCertificationPath();
1108 AttributeCertificationPath (const AttributeCertificationPath
&);
1109 virtual ~AttributeCertificationPath();
1110 virtual AsnType
*Clone() const;
1112 virtual AsnType
*Copy() const;
1114 AttributeCertificationPath
&operator = (const AttributeCertificationPath
&);
1115 AsnLen
BEncContent (BUF_TYPE b
);
1116 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
1118 AsnLen
BEnc (BUF_TYPE b
);
1119 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
1120 void Print (ostream
&os
) const;
1124 class AttributeCertificateAssertion
: public AsnType
1127 AttributeCertificateAssertionChoice
*subject
;
1129 GeneralizedTime
*attCertValidity
;
1130 AttributeCertificateAssertionSetOf
*attType
;
1132 AttributeCertificateAssertion();
1133 AttributeCertificateAssertion (const AttributeCertificateAssertion
&);
1134 virtual ~AttributeCertificateAssertion();
1135 virtual AsnType
*Clone() const;
1137 virtual AsnType
*Copy() const;
1139 AttributeCertificateAssertion
&operator = (const AttributeCertificateAssertion
&);
1140 AsnLen
BEncContent (BUF_TYPE b
);
1141 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
1143 AsnLen
BEnc (BUF_TYPE b
);
1144 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
1145 void Print (ostream
&os
) const;
1150 typedef Certificate UserCertificate
;
1153 typedef Certificate CACertificate
;
1155 /* CertificatePair */
1156 typedef CertificatePair CrossCertificatePair
;
1158 /* CertificateList */
1159 typedef CertificateList AuthorityRevocationList
;
1161 /* CertificateList */
1162 typedef CertificateList CertificateRevocationList
;
1164 /* CertificateList */
1165 typedef CertificateList AttributeCertificateRevocationList
;
1167 //------------------------------------------------------------------------------
1168 // externs for value defs
1170 #define id_at_userPassword_arc 2, 5, 4, 35
1171 #define id_at_userPassword AsnOid(id_at_userPassword_arc)
1172 #define id_at_userCertificate_arc 2, 5, 4, 36
1173 #define id_at_userCertificate AsnOid(id_at_userCertificate_arc)
1174 #define id_at_cAcertificate_arc 2, 5, 4, 37
1175 #define id_at_cAcertificate AsnOid(id_at_cAcertificate_arc)
1176 #define id_at_authorityRevocationList_arc 2, 5, 4, 38
1177 #define id_at_authorityRevocationList AsnOid(id_at_authorityRevocationList_arc)
1178 #define id_at_certificateRevocationList_arc 2, 5, 4, 39
1179 #define id_at_certificateRevocationList AsnOid(id_at_certificateRevocationList_arc)
1180 #define id_at_crossCertificatePair_arc 2, 5, 4, 40
1181 #define id_at_crossCertificatePair AsnOid(id_at_crossCertificatePair_arc)
1182 #define id_at_attributeCertificate_arc 2, 5, 4, 58
1183 #define id_at_attributeCertificate AsnOid(id_at_attributeCertificate_arc)
1184 //------------------------------------------------------------------------------
1186 #endif /* conditional include of sm_x509af.h */