1 // NOTE: this is a machine generated file--editing not recommended
3 // sm_cms.h - class definitions for ASN.1 module CryptographicMessageSyntax
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 OriginatorPublicKey
;
18 class CertificateRevocationLists
;
19 class IssuerAndSerialNumber
;
20 class OtherKeyAttribute
;
21 class DigestAlgorithmIdentifiers
;
22 class EncapsulatedContentInfo
;
23 class SignerIdentifier
;
24 class EncryptedContentInfo
;
25 class RecipientIdentifier
;
26 class OriginatorIdentifierOrKey
;
27 class RecipientKeyIdentifier
;
29 class ExtendedCertificateInfo
;
31 class KeyTransRecipientInfo
;
32 class KeyAgreeRecipientIdentifier
;
33 class KEKRecipientInfo
;
34 class ExtendedCertificate
;
36 class RecipientEncryptedKey
;
37 class CertificateChoices
;
40 class RecipientEncryptedKeys
;
41 class KeyAgreeRecipientInfo
;
49 class AuthenticatedData
;
50 class UserKeyingMaterials
;
51 class RC2CBCParameter
;
52 class ExtendedCertificateOrCertificate
;
55 //------------------------------------------------------------------------------
58 typedef enum CryptographicMessageSyntaxAnyId
61 } CryptographicMessageSyntaxAnyId
;
64 /* OBJECT IDENTIFIER */
65 typedef AsnOid ContentType
;
68 typedef AsnOcts SignatureValue
;
71 typedef AsnOcts EncryptedContent
;
74 typedef AsnOcts EncryptedKey
;
77 typedef AsnOcts Digest
;
80 typedef AsnOcts MessageAuthenticationCode
;
82 /* INTEGER { v0 (0), v1 (1), v2 (2), v3 (3), v4 (4) } */
83 class CMSVersion
: public AsnInt
86 CMSVersion(): AsnInt() {}
87 CMSVersion (int i
): AsnInt (i
) {}
100 typedef AsnOcts UserKeyingMaterial
;
103 typedef AsnOcts MessageDigest
;
106 typedef AsnInt RC2ParameterVersion
;
112 typedef AsnBits Signature
;
114 class OriginatorPublicKey
: public AsnType
117 AlgorithmIdentifier
*algorithm
;
120 OriginatorPublicKey();
121 OriginatorPublicKey (const OriginatorPublicKey
&);
122 virtual ~OriginatorPublicKey();
123 virtual AsnType
*Clone() const;
125 virtual AsnType
*Copy() const;
127 OriginatorPublicKey
&operator = (const OriginatorPublicKey
&);
128 AsnLen
BEncContent (BUF_TYPE b
);
129 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
131 AsnLen
BEnc (BUF_TYPE b
);
132 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
133 void Print (ostream
&os
) const;
137 /* AlgorithmIdentifier */
138 typedef AlgorithmIdentifier DigestAlgorithmIdentifier
;
140 /* AlgorithmIdentifier */
141 typedef AlgorithmIdentifier SignatureAlgorithmIdentifier
;
143 /* AlgorithmIdentifier */
144 typedef AlgorithmIdentifier KeyEncryptionAlgorithmIdentifier
;
146 /* AlgorithmIdentifier */
147 typedef AlgorithmIdentifier ContentEncryptionAlgorithmIdentifier
;
149 /* AlgorithmIdentifier */
150 typedef AlgorithmIdentifier MessageAuthenticationCodeAlgorithm
;
152 class CertificateRevocationLists
: public AsnType
155 unsigned long int count
;
160 CertificateList
*elmt
;
161 } *first
, *curr
, *last
;
164 CertificateRevocationLists() { count
= 0; first
= curr
= last
= NULL
; }
165 CertificateRevocationLists (const CertificateRevocationLists
&);
166 virtual ~CertificateRevocationLists();
167 virtual AsnType
*Clone() const;
169 virtual AsnType
*Copy() const;
171 CertificateRevocationLists
&operator = (const CertificateRevocationLists
&);
172 void SetCurrElmt (unsigned long int index
);
173 unsigned long int GetCurrElmtIndex();
174 void SetCurrToFirst() { curr
= first
; }
175 void SetCurrToLast() { curr
= last
; }
176 // reading member fcns
177 int Count() const { return count
; }
178 // NOTE: if your compiler complains about these NULLs, its definition of NULL is broken (and you better change it there!)
179 CertificateList
*First() const { return count
> 0 ? first
->elmt
: NULL
; }
180 CertificateList
*Last() const { return count
> 0 ? last
->elmt
: NULL
; }
181 CertificateList
*Curr() const { return curr
? curr
->elmt
: NULL
; }
182 CertificateList
*Next() const { return curr
&& curr
->next
? curr
->next
->elmt
: NULL
; }
183 CertificateList
*Prev() const { return curr
&& curr
->prev
? curr
->prev
->elmt
: NULL
; }
185 // routines that move the curr elmt
186 CertificateList
*GoNext() { if (curr
) curr
= curr
->next
; return Curr(); }
187 CertificateList
*GoPrev() { if (curr
) curr
= curr
->prev
; return Curr(); }
189 // write & alloc fcns - returns new elmt
190 CertificateList
*Append(); // add elmt to end of list
191 CertificateList
*Prepend(); // add elmt to beginning of list
192 CertificateList
*InsertBefore(); //insert elmt before current elmt
193 CertificateList
*InsertAfter(); //insert elmt after current elmt
195 // write & alloc & copy - returns list after copying elmt
196 CertificateRevocationLists
&AppendCopy (CertificateList
&elmt
); // add elmt to end of list
197 CertificateRevocationLists
&PrependCopy (CertificateList
&elmt
); // add elmt to beginning of list
198 CertificateRevocationLists
&InsertBeforeAndCopy (CertificateList
&elmt
); //insert elmt before current elmt
199 CertificateRevocationLists
&InsertAfterAndCopy (CertificateList
&elmt
); //insert elmt after current elmt
201 // removing the current elmt from the list
202 void RemoveCurrFromList();
204 // encode and decode routines
205 AsnLen
BEnc (BUF_TYPE b
);
206 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
207 AsnLen
BEncContent (BUF_TYPE b
);
208 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
211 void Print (ostream
&os
) const;
215 class IssuerAndSerialNumber
: public AsnType
219 CertificateSerialNumber serialNumber
;
221 IssuerAndSerialNumber();
222 IssuerAndSerialNumber (const IssuerAndSerialNumber
&);
223 virtual ~IssuerAndSerialNumber();
224 virtual AsnType
*Clone() const;
226 virtual AsnType
*Copy() const;
228 IssuerAndSerialNumber
&operator = (const IssuerAndSerialNumber
&);
229 AsnLen
BEncContent (BUF_TYPE b
);
230 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
232 AsnLen
BEnc (BUF_TYPE b
);
233 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
234 void Print (ostream
&os
) const;
238 class OtherKeyAttribute
: public AsnType
245 OtherKeyAttribute (const OtherKeyAttribute
&);
246 virtual ~OtherKeyAttribute();
247 virtual AsnType
*Clone() const;
249 virtual AsnType
*Copy() const;
251 OtherKeyAttribute
&operator = (const OtherKeyAttribute
&);
252 AsnLen
BEncContent (BUF_TYPE b
);
253 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 DigestAlgorithmIdentifiers
: public AsnType
264 unsigned long int count
;
269 DigestAlgorithmIdentifier
*elmt
;
270 } *first
, *curr
, *last
;
273 DigestAlgorithmIdentifiers() { count
= 0; first
= curr
= last
= NULL
; }
274 DigestAlgorithmIdentifiers (const DigestAlgorithmIdentifiers
&);
275 virtual ~DigestAlgorithmIdentifiers();
276 virtual AsnType
*Clone() const;
278 virtual AsnType
*Copy() const;
280 DigestAlgorithmIdentifiers
&operator = (const DigestAlgorithmIdentifiers
&);
281 void SetCurrElmt (unsigned long int index
);
282 unsigned long int GetCurrElmtIndex();
283 void SetCurrToFirst() { curr
= first
; }
284 void SetCurrToLast() { curr
= last
; }
285 // reading member fcns
286 int Count() const { return count
; }
287 // NOTE: if your compiler complains about these NULLs, its definition of NULL is broken (and you better change it there!)
288 DigestAlgorithmIdentifier
*First() const { return count
> 0 ? first
->elmt
: NULL
; }
289 DigestAlgorithmIdentifier
*Last() const { return count
> 0 ? last
->elmt
: NULL
; }
290 DigestAlgorithmIdentifier
*Curr() const { return curr
? curr
->elmt
: NULL
; }
291 DigestAlgorithmIdentifier
*Next() const { return curr
&& curr
->next
? curr
->next
->elmt
: NULL
; }
292 DigestAlgorithmIdentifier
*Prev() const { return curr
&& curr
->prev
? curr
->prev
->elmt
: NULL
; }
294 // routines that move the curr elmt
295 DigestAlgorithmIdentifier
*GoNext() { if (curr
) curr
= curr
->next
; return Curr(); }
296 DigestAlgorithmIdentifier
*GoPrev() { if (curr
) curr
= curr
->prev
; return Curr(); }
298 // write & alloc fcns - returns new elmt
299 DigestAlgorithmIdentifier
*Append(); // add elmt to end of list
300 DigestAlgorithmIdentifier
*Prepend(); // add elmt to beginning of list
301 DigestAlgorithmIdentifier
*InsertBefore(); //insert elmt before current elmt
302 DigestAlgorithmIdentifier
*InsertAfter(); //insert elmt after current elmt
304 // write & alloc & copy - returns list after copying elmt
305 DigestAlgorithmIdentifiers
&AppendCopy (DigestAlgorithmIdentifier
&elmt
); // add elmt to end of list
306 DigestAlgorithmIdentifiers
&PrependCopy (DigestAlgorithmIdentifier
&elmt
); // add elmt to beginning of list
307 DigestAlgorithmIdentifiers
&InsertBeforeAndCopy (DigestAlgorithmIdentifier
&elmt
); //insert elmt before current elmt
308 DigestAlgorithmIdentifiers
&InsertAfterAndCopy (DigestAlgorithmIdentifier
&elmt
); //insert elmt after current elmt
310 // removing the current elmt from the list
311 void RemoveCurrFromList();
313 // encode and decode routines
314 AsnLen
BEnc (BUF_TYPE b
);
315 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
316 AsnLen
BEncContent (BUF_TYPE b
);
317 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
320 void Print (ostream
&os
) const;
324 class EncapsulatedContentInfo
: public AsnType
327 ContentType eContentType
;
330 EncapsulatedContentInfo();
331 EncapsulatedContentInfo (const EncapsulatedContentInfo
&);
332 virtual ~EncapsulatedContentInfo();
333 virtual AsnType
*Clone() const;
335 virtual AsnType
*Copy() const;
337 EncapsulatedContentInfo
&operator = (const EncapsulatedContentInfo
&);
338 AsnLen
BEncContent (BUF_TYPE b
);
339 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
341 AsnLen
BEnc (BUF_TYPE b
);
342 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
343 void Print (ostream
&os
) const;
347 class SignerIdentifier
: public AsnType
352 issuerAndSerialNumberCid
= 0,
353 subjectKeyIdentifierCid
= 1
356 enum ChoiceIdEnum choiceId
;
359 IssuerAndSerialNumber
*issuerAndSerialNumber
;
360 KeyIdentifier
*subjectKeyIdentifier
;
365 SignerIdentifier (const SignerIdentifier
&);
366 virtual ~SignerIdentifier();
368 virtual AsnType
*Clone() const;
370 virtual AsnType
*Copy() const;
372 SignerIdentifier
&operator = (const SignerIdentifier
&);
373 AsnLen
BEncContent (BUF_TYPE b
);
374 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
375 AsnLen
BEnc (BUF_TYPE b
);
376 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
377 void Print (ostream
&os
) const;
381 class EncryptedContentInfo
: public AsnType
384 ContentType contentType
;
385 ContentEncryptionAlgorithmIdentifier
*contentEncryptionAlgorithm
;
386 EncryptedContent
*encryptedContent
;
388 EncryptedContentInfo();
389 EncryptedContentInfo (const EncryptedContentInfo
&);
390 virtual ~EncryptedContentInfo();
391 virtual AsnType
*Clone() const;
393 virtual AsnType
*Copy() const;
395 EncryptedContentInfo
&operator = (const EncryptedContentInfo
&);
396 AsnLen
BEncContent (BUF_TYPE b
);
397 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
399 AsnLen
BEnc (BUF_TYPE b
);
400 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
401 void Print (ostream
&os
) const;
405 class RecipientIdentifier
: public AsnType
410 issuerAndSerialNumberCid
= 0,
411 subjectKeyIdentifierCid
= 1
414 enum ChoiceIdEnum choiceId
;
417 IssuerAndSerialNumber
*issuerAndSerialNumber
;
418 KeyIdentifier
*subjectKeyIdentifier
;
422 RecipientIdentifier();
423 RecipientIdentifier (const RecipientIdentifier
&);
424 virtual ~RecipientIdentifier();
426 virtual AsnType
*Clone() const;
428 virtual AsnType
*Copy() const;
430 RecipientIdentifier
&operator = (const RecipientIdentifier
&);
431 AsnLen
BEncContent (BUF_TYPE b
);
432 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
433 AsnLen
BEnc (BUF_TYPE b
);
434 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
435 void Print (ostream
&os
) const;
439 class OriginatorIdentifierOrKey
: public AsnType
444 issuerAndSerialNumberCid
= 0,
445 subjectKeyIdentifierCid
= 1,
449 enum ChoiceIdEnum choiceId
;
452 IssuerAndSerialNumber
*issuerAndSerialNumber
;
453 KeyIdentifier
*subjectKeyIdentifier
;
454 OriginatorPublicKey
*originatorKey
;
458 OriginatorIdentifierOrKey();
459 OriginatorIdentifierOrKey (const OriginatorIdentifierOrKey
&);
460 virtual ~OriginatorIdentifierOrKey();
462 virtual AsnType
*Clone() const;
464 virtual AsnType
*Copy() const;
466 OriginatorIdentifierOrKey
&operator = (const OriginatorIdentifierOrKey
&);
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 RecipientKeyIdentifier
: public AsnType
478 KeyIdentifier subjectKeyIdentifier
;
479 GeneralizedTime
*date
;
480 OtherKeyAttribute
*other
;
482 RecipientKeyIdentifier();
483 RecipientKeyIdentifier (const RecipientKeyIdentifier
&);
484 virtual ~RecipientKeyIdentifier();
485 virtual AsnType
*Clone() const;
487 virtual AsnType
*Copy() const;
489 RecipientKeyIdentifier
&operator = (const RecipientKeyIdentifier
&);
490 AsnLen
BEncContent (BUF_TYPE b
);
491 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
493 AsnLen
BEnc (BUF_TYPE b
);
494 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
495 void Print (ostream
&os
) const;
499 class KEKIdentifier
: public AsnType
502 AsnOcts keyIdentifier
;
503 GeneralizedTime
*date
;
504 OtherKeyAttribute
*other
;
507 KEKIdentifier (const KEKIdentifier
&);
508 virtual ~KEKIdentifier();
509 virtual AsnType
*Clone() const;
511 virtual AsnType
*Copy() const;
513 KEKIdentifier
&operator = (const KEKIdentifier
&);
514 AsnLen
BEncContent (BUF_TYPE b
);
515 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
517 AsnLen
BEnc (BUF_TYPE b
);
518 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
519 void Print (ostream
&os
) const;
523 class ExtendedCertificateInfo
: public AsnType
527 Certificate
*certificate
;
528 Attributes attributes
;
530 ExtendedCertificateInfo();
531 ExtendedCertificateInfo (const ExtendedCertificateInfo
&);
532 virtual ~ExtendedCertificateInfo();
533 virtual AsnType
*Clone() const;
535 virtual AsnType
*Copy() const;
537 ExtendedCertificateInfo
&operator = (const ExtendedCertificateInfo
&);
538 AsnLen
BEncContent (BUF_TYPE b
);
539 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
541 AsnLen
BEnc (BUF_TYPE b
);
542 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
543 void Print (ostream
&os
) const;
547 class SignerInfo
: public AsnType
551 SignerIdentifier
*sid
;
552 DigestAlgorithmIdentifier
*digestAlgorithm
;
553 Attributes
*signedAttrs
;
554 SignatureAlgorithmIdentifier
*signatureAlgorithm
;
555 SignatureValue signature
;
556 Attributes
*unsignedAttrs
;
559 SignerInfo (const SignerInfo
&);
560 virtual ~SignerInfo();
561 virtual AsnType
*Clone() const;
563 virtual AsnType
*Copy() const;
565 SignerInfo
&operator = (const SignerInfo
&);
566 AsnLen
BEncContent (BUF_TYPE b
);
567 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
569 AsnLen
BEnc (BUF_TYPE b
);
570 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
571 void Print (ostream
&os
) const;
575 class KeyTransRecipientInfo
: public AsnType
579 RecipientIdentifier
*rid
;
580 KeyEncryptionAlgorithmIdentifier
*keyEncryptionAlgorithm
;
581 EncryptedKey encryptedKey
;
583 KeyTransRecipientInfo();
584 KeyTransRecipientInfo (const KeyTransRecipientInfo
&);
585 virtual ~KeyTransRecipientInfo();
586 virtual AsnType
*Clone() const;
588 virtual AsnType
*Copy() const;
590 KeyTransRecipientInfo
&operator = (const KeyTransRecipientInfo
&);
591 AsnLen
BEncContent (BUF_TYPE b
);
592 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
594 AsnLen
BEnc (BUF_TYPE b
);
595 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
596 void Print (ostream
&os
) const;
600 class KeyAgreeRecipientIdentifier
: public AsnType
605 issuerAndSerialNumberCid
= 0,
609 enum ChoiceIdEnum choiceId
;
612 IssuerAndSerialNumber
*issuerAndSerialNumber
;
613 RecipientKeyIdentifier
*rKeyId
;
617 KeyAgreeRecipientIdentifier();
618 KeyAgreeRecipientIdentifier (const KeyAgreeRecipientIdentifier
&);
619 virtual ~KeyAgreeRecipientIdentifier();
621 virtual AsnType
*Clone() const;
623 virtual AsnType
*Copy() const;
625 KeyAgreeRecipientIdentifier
&operator = (const KeyAgreeRecipientIdentifier
&);
626 AsnLen
BEncContent (BUF_TYPE b
);
627 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
628 AsnLen
BEnc (BUF_TYPE b
);
629 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
630 void Print (ostream
&os
) const;
634 class KEKRecipientInfo
: public AsnType
638 KEKIdentifier
*kekid
;
639 KeyEncryptionAlgorithmIdentifier
*keyEncryptionAlgorithm
;
640 EncryptedKey encryptedKey
;
643 KEKRecipientInfo (const KEKRecipientInfo
&);
644 virtual ~KEKRecipientInfo();
645 virtual AsnType
*Clone() const;
647 virtual AsnType
*Copy() const;
649 KEKRecipientInfo
&operator = (const KEKRecipientInfo
&);
650 AsnLen
BEncContent (BUF_TYPE b
);
651 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
653 AsnLen
BEnc (BUF_TYPE b
);
654 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
655 void Print (ostream
&os
) const;
659 class ExtendedCertificate
: public AsnType
662 ExtendedCertificateInfo
*extendedCertificateInfo
;
663 SignatureAlgorithmIdentifier
*signatureAlgorithm
;
666 ExtendedCertificate();
667 ExtendedCertificate (const ExtendedCertificate
&);
668 virtual ~ExtendedCertificate();
669 virtual AsnType
*Clone() const;
671 virtual AsnType
*Copy() const;
673 ExtendedCertificate
&operator = (const ExtendedCertificate
&);
674 AsnLen
BEncContent (BUF_TYPE b
);
675 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
677 AsnLen
BEnc (BUF_TYPE b
);
678 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
679 void Print (ostream
&os
) const;
683 class SignerInfos
: public AsnType
686 unsigned long int count
;
692 } *first
, *curr
, *last
;
695 SignerInfos() { count
= 0; first
= curr
= last
= NULL
; }
696 SignerInfos (const SignerInfos
&);
697 virtual ~SignerInfos();
698 virtual AsnType
*Clone() const;
700 virtual AsnType
*Copy() const;
702 SignerInfos
&operator = (const SignerInfos
&);
703 void SetCurrElmt (unsigned long int index
);
704 unsigned long int GetCurrElmtIndex();
705 void SetCurrToFirst() { curr
= first
; }
706 void SetCurrToLast() { curr
= last
; }
707 // reading member fcns
708 int Count() const { return count
; }
709 // NOTE: if your compiler complains about these NULLs, its definition of NULL is broken (and you better change it there!)
710 SignerInfo
*First() const { return count
> 0 ? first
->elmt
: NULL
; }
711 SignerInfo
*Last() const { return count
> 0 ? last
->elmt
: NULL
; }
712 SignerInfo
*Curr() const { return curr
? curr
->elmt
: NULL
; }
713 SignerInfo
*Next() const { return curr
&& curr
->next
? curr
->next
->elmt
: NULL
; }
714 SignerInfo
*Prev() const { return curr
&& curr
->prev
? curr
->prev
->elmt
: NULL
; }
716 // routines that move the curr elmt
717 SignerInfo
*GoNext() { if (curr
) curr
= curr
->next
; return Curr(); }
718 SignerInfo
*GoPrev() { if (curr
) curr
= curr
->prev
; return Curr(); }
720 // write & alloc fcns - returns new elmt
721 SignerInfo
*Append(); // add elmt to end of list
722 SignerInfo
*Prepend(); // add elmt to beginning of list
723 SignerInfo
*InsertBefore(); //insert elmt before current elmt
724 SignerInfo
*InsertAfter(); //insert elmt after current elmt
726 // write & alloc & copy - returns list after copying elmt
727 SignerInfos
&AppendCopy (SignerInfo
&elmt
); // add elmt to end of list
728 SignerInfos
&PrependCopy (SignerInfo
&elmt
); // add elmt to beginning of list
729 SignerInfos
&InsertBeforeAndCopy (SignerInfo
&elmt
); //insert elmt before current elmt
730 SignerInfos
&InsertAfterAndCopy (SignerInfo
&elmt
); //insert elmt after current elmt
732 // removing the current elmt from the list
733 void RemoveCurrFromList();
735 // encode and decode routines
736 AsnLen
BEnc (BUF_TYPE b
);
737 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
738 AsnLen
BEncContent (BUF_TYPE b
);
739 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
742 void Print (ostream
&os
) const;
746 class RecipientEncryptedKey
: public AsnType
749 KeyAgreeRecipientIdentifier
*rid
;
750 EncryptedKey encryptedKey
;
752 RecipientEncryptedKey();
753 RecipientEncryptedKey (const RecipientEncryptedKey
&);
754 virtual ~RecipientEncryptedKey();
755 virtual AsnType
*Clone() const;
757 virtual AsnType
*Copy() const;
759 RecipientEncryptedKey
&operator = (const RecipientEncryptedKey
&);
760 AsnLen
BEncContent (BUF_TYPE b
);
761 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
763 AsnLen
BEnc (BUF_TYPE b
);
764 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
765 void Print (ostream
&os
) const;
769 class CertificateChoices
: public AsnType
775 extendedCertificateCid
= 1,
779 enum ChoiceIdEnum choiceId
;
782 Certificate
*certificate
;
783 ExtendedCertificate
*extendedCertificate
;
784 AttributeCertificate
*attrCert
;
788 CertificateChoices();
789 CertificateChoices (const CertificateChoices
&);
790 virtual ~CertificateChoices();
792 virtual AsnType
*Clone() const;
794 virtual AsnType
*Copy() const;
796 CertificateChoices
&operator = (const CertificateChoices
&);
797 AsnLen
BEncContent (BUF_TYPE b
);
798 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
799 AsnLen
BEnc (BUF_TYPE b
);
800 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
801 void Print (ostream
&os
) const;
805 class CertificateSet
: public AsnType
808 unsigned long int count
;
813 CertificateChoices
*elmt
;
814 } *first
, *curr
, *last
;
817 CertificateSet() { count
= 0; first
= curr
= last
= NULL
; }
818 CertificateSet (const CertificateSet
&);
819 virtual ~CertificateSet();
820 virtual AsnType
*Clone() const;
822 virtual AsnType
*Copy() const;
824 CertificateSet
&operator = (const CertificateSet
&);
825 void SetCurrElmt (unsigned long int index
);
826 unsigned long int GetCurrElmtIndex();
827 void SetCurrToFirst() { curr
= first
; }
828 void SetCurrToLast() { curr
= last
; }
829 // reading member fcns
830 int Count() const { return count
; }
831 // NOTE: if your compiler complains about these NULLs, its definition of NULL is broken (and you better change it there!)
832 CertificateChoices
*First() const { return count
> 0 ? first
->elmt
: NULL
; }
833 CertificateChoices
*Last() const { return count
> 0 ? last
->elmt
: NULL
; }
834 CertificateChoices
*Curr() const { return curr
? curr
->elmt
: NULL
; }
835 CertificateChoices
*Next() const { return curr
&& curr
->next
? curr
->next
->elmt
: NULL
; }
836 CertificateChoices
*Prev() const { return curr
&& curr
->prev
? curr
->prev
->elmt
: NULL
; }
838 // routines that move the curr elmt
839 CertificateChoices
*GoNext() { if (curr
) curr
= curr
->next
; return Curr(); }
840 CertificateChoices
*GoPrev() { if (curr
) curr
= curr
->prev
; return Curr(); }
842 // write & alloc fcns - returns new elmt
843 CertificateChoices
*Append(); // add elmt to end of list
844 CertificateChoices
*Prepend(); // add elmt to beginning of list
845 CertificateChoices
*InsertBefore(); //insert elmt before current elmt
846 CertificateChoices
*InsertAfter(); //insert elmt after current elmt
848 // write & alloc & copy - returns list after copying elmt
849 CertificateSet
&AppendCopy (CertificateChoices
&elmt
); // add elmt to end of list
850 CertificateSet
&PrependCopy (CertificateChoices
&elmt
); // add elmt to beginning of list
851 CertificateSet
&InsertBeforeAndCopy (CertificateChoices
&elmt
); //insert elmt before current elmt
852 CertificateSet
&InsertAfterAndCopy (CertificateChoices
&elmt
); //insert elmt after current elmt
854 // removing the current elmt from the list
855 void RemoveCurrFromList();
857 // encode and decode routines
858 AsnLen
BEnc (BUF_TYPE b
);
859 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
860 AsnLen
BEncContent (BUF_TYPE b
);
861 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
864 void Print (ostream
&os
) const;
868 class OriginatorInfo
: public AsnType
871 CertificateSet
*certs
;
872 CertificateRevocationLists
*crls
;
875 OriginatorInfo (const OriginatorInfo
&);
876 virtual ~OriginatorInfo();
877 virtual AsnType
*Clone() const;
879 virtual AsnType
*Copy() const;
881 OriginatorInfo
&operator = (const OriginatorInfo
&);
882 AsnLen
BEncContent (BUF_TYPE b
);
883 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
885 AsnLen
BEnc (BUF_TYPE b
);
886 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
887 void Print (ostream
&os
) const;
891 class RecipientEncryptedKeys
: public AsnType
894 unsigned long int count
;
899 RecipientEncryptedKey
*elmt
;
900 } *first
, *curr
, *last
;
903 RecipientEncryptedKeys() { count
= 0; first
= curr
= last
= NULL
; }
904 RecipientEncryptedKeys (const RecipientEncryptedKeys
&);
905 virtual ~RecipientEncryptedKeys();
906 virtual AsnType
*Clone() const;
908 virtual AsnType
*Copy() const;
910 RecipientEncryptedKeys
&operator = (const RecipientEncryptedKeys
&);
911 void SetCurrElmt (unsigned long int index
);
912 unsigned long int GetCurrElmtIndex();
913 void SetCurrToFirst() { curr
= first
; }
914 void SetCurrToLast() { curr
= last
; }
915 // reading member fcns
916 int Count() const { return count
; }
917 // NOTE: if your compiler complains about these NULLs, its definition of NULL is broken (and you better change it there!)
918 RecipientEncryptedKey
*First() const { return count
> 0 ? first
->elmt
: NULL
; }
919 RecipientEncryptedKey
*Last() const { return count
> 0 ? last
->elmt
: NULL
; }
920 RecipientEncryptedKey
*Curr() const { return curr
? curr
->elmt
: NULL
; }
921 RecipientEncryptedKey
*Next() const { return curr
&& curr
->next
? curr
->next
->elmt
: NULL
; }
922 RecipientEncryptedKey
*Prev() const { return curr
&& curr
->prev
? curr
->prev
->elmt
: NULL
; }
924 // routines that move the curr elmt
925 RecipientEncryptedKey
*GoNext() { if (curr
) curr
= curr
->next
; return Curr(); }
926 RecipientEncryptedKey
*GoPrev() { if (curr
) curr
= curr
->prev
; return Curr(); }
928 // write & alloc fcns - returns new elmt
929 RecipientEncryptedKey
*Append(); // add elmt to end of list
930 RecipientEncryptedKey
*Prepend(); // add elmt to beginning of list
931 RecipientEncryptedKey
*InsertBefore(); //insert elmt before current elmt
932 RecipientEncryptedKey
*InsertAfter(); //insert elmt after current elmt
934 // write & alloc & copy - returns list after copying elmt
935 RecipientEncryptedKeys
&AppendCopy (RecipientEncryptedKey
&elmt
); // add elmt to end of list
936 RecipientEncryptedKeys
&PrependCopy (RecipientEncryptedKey
&elmt
); // add elmt to beginning of list
937 RecipientEncryptedKeys
&InsertBeforeAndCopy (RecipientEncryptedKey
&elmt
); //insert elmt before current elmt
938 RecipientEncryptedKeys
&InsertAfterAndCopy (RecipientEncryptedKey
&elmt
); //insert elmt after current elmt
940 // removing the current elmt from the list
941 void RemoveCurrFromList();
943 // encode and decode routines
944 AsnLen
BEnc (BUF_TYPE b
);
945 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
946 AsnLen
BEncContent (BUF_TYPE b
);
947 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
950 void Print (ostream
&os
) const;
954 class KeyAgreeRecipientInfo
: public AsnType
958 OriginatorIdentifierOrKey
*originator
;
959 UserKeyingMaterial
*ukm
;
960 KeyEncryptionAlgorithmIdentifier
*keyEncryptionAlgorithm
;
961 RecipientEncryptedKeys recipientEncryptedKeys
;
963 KeyAgreeRecipientInfo();
964 KeyAgreeRecipientInfo (const KeyAgreeRecipientInfo
&);
965 virtual ~KeyAgreeRecipientInfo();
966 virtual AsnType
*Clone() const;
968 virtual AsnType
*Copy() const;
970 KeyAgreeRecipientInfo
&operator = (const KeyAgreeRecipientInfo
&);
971 AsnLen
BEncContent (BUF_TYPE b
);
972 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
974 AsnLen
BEnc (BUF_TYPE b
);
975 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
976 void Print (ostream
&os
) const;
980 class RecipientInfo
: public AsnType
990 enum ChoiceIdEnum choiceId
;
993 KeyTransRecipientInfo
*ktri
;
994 KeyAgreeRecipientInfo
*kari
;
995 KEKRecipientInfo
*kekri
;
1000 RecipientInfo (const RecipientInfo
&);
1001 virtual ~RecipientInfo();
1003 virtual AsnType
*Clone() const;
1005 virtual AsnType
*Copy() const;
1007 RecipientInfo
&operator = (const RecipientInfo
&);
1008 AsnLen
BEncContent (BUF_TYPE b
);
1009 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
1010 AsnLen
BEnc (BUF_TYPE b
);
1011 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
1012 void Print (ostream
&os
) const;
1016 class RecipientInfos
: public AsnType
1019 unsigned long int count
;
1024 RecipientInfo
*elmt
;
1025 } *first
, *curr
, *last
;
1028 RecipientInfos() { count
= 0; first
= curr
= last
= NULL
; }
1029 RecipientInfos (const RecipientInfos
&);
1030 virtual ~RecipientInfos();
1031 virtual AsnType
*Clone() const;
1033 virtual AsnType
*Copy() const;
1035 RecipientInfos
&operator = (const RecipientInfos
&);
1036 void SetCurrElmt (unsigned long int index
);
1037 unsigned long int GetCurrElmtIndex();
1038 void SetCurrToFirst() { curr
= first
; }
1039 void SetCurrToLast() { curr
= last
; }
1040 // reading member fcns
1041 int Count() const { return count
; }
1042 // NOTE: if your compiler complains about these NULLs, its definition of NULL is broken (and you better change it there!)
1043 RecipientInfo
*First() const { return count
> 0 ? first
->elmt
: NULL
; }
1044 RecipientInfo
*Last() const { return count
> 0 ? last
->elmt
: NULL
; }
1045 RecipientInfo
*Curr() const { return curr
? curr
->elmt
: NULL
; }
1046 RecipientInfo
*Next() const { return curr
&& curr
->next
? curr
->next
->elmt
: NULL
; }
1047 RecipientInfo
*Prev() const { return curr
&& curr
->prev
? curr
->prev
->elmt
: NULL
; }
1049 // routines that move the curr elmt
1050 RecipientInfo
*GoNext() { if (curr
) curr
= curr
->next
; return Curr(); }
1051 RecipientInfo
*GoPrev() { if (curr
) curr
= curr
->prev
; return Curr(); }
1053 // write & alloc fcns - returns new elmt
1054 RecipientInfo
*Append(); // add elmt to end of list
1055 RecipientInfo
*Prepend(); // add elmt to beginning of list
1056 RecipientInfo
*InsertBefore(); //insert elmt before current elmt
1057 RecipientInfo
*InsertAfter(); //insert elmt after current elmt
1059 // write & alloc & copy - returns list after copying elmt
1060 RecipientInfos
&AppendCopy (RecipientInfo
&elmt
); // add elmt to end of list
1061 RecipientInfos
&PrependCopy (RecipientInfo
&elmt
); // add elmt to beginning of list
1062 RecipientInfos
&InsertBeforeAndCopy (RecipientInfo
&elmt
); //insert elmt before current elmt
1063 RecipientInfos
&InsertAfterAndCopy (RecipientInfo
&elmt
); //insert elmt after current elmt
1065 // removing the current elmt from the list
1066 void RemoveCurrFromList();
1068 // encode and decode routines
1069 AsnLen
BEnc (BUF_TYPE b
);
1070 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
1071 AsnLen
BEncContent (BUF_TYPE b
);
1072 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
1075 void Print (ostream
&os
) const;
1079 class ContentInfo
: public AsnType
1082 ContentType contentType
;
1086 ContentInfo (const ContentInfo
&);
1087 virtual ~ContentInfo();
1088 virtual AsnType
*Clone() const;
1090 virtual AsnType
*Copy() const;
1092 ContentInfo
&operator = (const ContentInfo
&);
1093 AsnLen
BEncContent (BUF_TYPE b
);
1094 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
1096 AsnLen
BEnc (BUF_TYPE b
);
1097 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
1098 void Print (ostream
&os
) const;
1102 class SignedData
: public AsnType
1106 DigestAlgorithmIdentifiers digestAlgorithms
;
1107 EncapsulatedContentInfo
*encapContentInfo
;
1108 CertificateSet
*certificates
;
1109 CertificateRevocationLists
*crls
;
1110 SignerInfos signerInfos
;
1113 SignedData (const SignedData
&);
1114 virtual ~SignedData();
1115 virtual AsnType
*Clone() const;
1117 virtual AsnType
*Copy() const;
1119 SignedData
&operator = (const SignedData
&);
1120 AsnLen
BEncContent (BUF_TYPE b
);
1121 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
1123 AsnLen
BEnc (BUF_TYPE b
);
1124 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
1125 void Print (ostream
&os
) const;
1129 class EnvelopedData
: public AsnType
1133 OriginatorInfo
*originatorInfo
;
1134 RecipientInfos recipientInfos
;
1135 EncryptedContentInfo
*encryptedContentInfo
;
1136 Attributes
*unprotectedAttrs
;
1139 EnvelopedData (const EnvelopedData
&);
1140 virtual ~EnvelopedData();
1141 virtual AsnType
*Clone() const;
1143 virtual AsnType
*Copy() const;
1145 EnvelopedData
&operator = (const EnvelopedData
&);
1146 AsnLen
BEncContent (BUF_TYPE b
);
1147 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
1149 AsnLen
BEnc (BUF_TYPE b
);
1150 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
1151 void Print (ostream
&os
) const;
1155 class DigestedData
: public AsnType
1159 DigestAlgorithmIdentifier
*digestAlgorithm
;
1160 EncapsulatedContentInfo
*encapContentInfo
;
1164 DigestedData (const DigestedData
&);
1165 virtual ~DigestedData();
1166 virtual AsnType
*Clone() const;
1168 virtual AsnType
*Copy() const;
1170 DigestedData
&operator = (const DigestedData
&);
1171 AsnLen
BEncContent (BUF_TYPE b
);
1172 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
1174 AsnLen
BEnc (BUF_TYPE b
);
1175 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
1176 void Print (ostream
&os
) const;
1180 class EncryptedData
: public AsnType
1184 EncryptedContentInfo
*encryptedContentInfo
;
1187 EncryptedData (const EncryptedData
&);
1188 virtual ~EncryptedData();
1189 virtual AsnType
*Clone() const;
1191 virtual AsnType
*Copy() const;
1193 EncryptedData
&operator = (const EncryptedData
&);
1194 AsnLen
BEncContent (BUF_TYPE b
);
1195 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
1197 AsnLen
BEnc (BUF_TYPE b
);
1198 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
1199 void Print (ostream
&os
) const;
1203 class AuthenticatedData
: public AsnType
1207 OriginatorInfo
*originatorInfo
;
1208 RecipientInfos recipientInfos
;
1209 MessageAuthenticationCodeAlgorithm
*macAlgorithm
;
1210 DigestAlgorithmIdentifier
*digestAlgorithm
;
1211 EncapsulatedContentInfo
*encapContentInfo
;
1212 Attributes
*authenctiatedAttributes
;
1213 MessageAuthenticationCode mac
;
1214 Attributes
*unauthenticatedAttributes
;
1216 AuthenticatedData();
1217 AuthenticatedData (const AuthenticatedData
&);
1218 virtual ~AuthenticatedData();
1219 virtual AsnType
*Clone() const;
1221 virtual AsnType
*Copy() const;
1223 AuthenticatedData
&operator = (const AuthenticatedData
&);
1224 AsnLen
BEncContent (BUF_TYPE b
);
1225 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
1227 AsnLen
BEnc (BUF_TYPE b
);
1228 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
1229 void Print (ostream
&os
) const;
1233 class UserKeyingMaterials
: public AsnType
1236 unsigned long int count
;
1241 UserKeyingMaterial
*elmt
;
1242 } *first
, *curr
, *last
;
1245 UserKeyingMaterials() { count
= 0; first
= curr
= last
= NULL
; }
1246 UserKeyingMaterials (const UserKeyingMaterials
&);
1247 virtual ~UserKeyingMaterials();
1248 virtual AsnType
*Clone() const;
1250 virtual AsnType
*Copy() const;
1252 UserKeyingMaterials
&operator = (const UserKeyingMaterials
&);
1253 void SetCurrElmt (unsigned long int index
);
1254 unsigned long int GetCurrElmtIndex();
1255 void SetCurrToFirst() { curr
= first
; }
1256 void SetCurrToLast() { curr
= last
; }
1257 // reading member fcns
1258 int Count() const { return count
; }
1259 // NOTE: if your compiler complains about these NULLs, its definition of NULL is broken (and you better change it there!)
1260 UserKeyingMaterial
*First() const { return count
> 0 ? first
->elmt
: NULL
; }
1261 UserKeyingMaterial
*Last() const { return count
> 0 ? last
->elmt
: NULL
; }
1262 UserKeyingMaterial
*Curr() const { return curr
? curr
->elmt
: NULL
; }
1263 UserKeyingMaterial
*Next() const { return curr
&& curr
->next
? curr
->next
->elmt
: NULL
; }
1264 UserKeyingMaterial
*Prev() const { return curr
&& curr
->prev
? curr
->prev
->elmt
: NULL
; }
1266 // routines that move the curr elmt
1267 UserKeyingMaterial
*GoNext() { if (curr
) curr
= curr
->next
; return Curr(); }
1268 UserKeyingMaterial
*GoPrev() { if (curr
) curr
= curr
->prev
; return Curr(); }
1270 // write & alloc fcns - returns new elmt
1271 UserKeyingMaterial
*Append(); // add elmt to end of list
1272 UserKeyingMaterial
*Prepend(); // add elmt to beginning of list
1273 UserKeyingMaterial
*InsertBefore(); //insert elmt before current elmt
1274 UserKeyingMaterial
*InsertAfter(); //insert elmt after current elmt
1276 // write & alloc & copy - returns list after copying elmt
1277 UserKeyingMaterials
&AppendCopy (UserKeyingMaterial
&elmt
); // add elmt to end of list
1278 UserKeyingMaterials
&PrependCopy (UserKeyingMaterial
&elmt
); // add elmt to beginning of list
1279 UserKeyingMaterials
&InsertBeforeAndCopy (UserKeyingMaterial
&elmt
); //insert elmt before current elmt
1280 UserKeyingMaterials
&InsertAfterAndCopy (UserKeyingMaterial
&elmt
); //insert elmt after current elmt
1282 // removing the current elmt from the list
1283 void RemoveCurrFromList();
1285 // encode and decode routines
1286 AsnLen
BEnc (BUF_TYPE b
);
1287 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
1288 AsnLen
BEncContent (BUF_TYPE b
);
1289 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
1292 void Print (ostream
&os
) const;
1297 typedef Time SigningTime
;
1300 typedef SignerInfo Countersignature
;
1302 /* AlgorithmIdentifier */
1303 typedef AlgorithmIdentifier KeyWrapAlgorithm
;
1305 /* RC2ParameterVersion */
1306 typedef RC2ParameterVersion RC2wrapParameter
;
1309 typedef IV CBCParameter
;
1311 class RC2CBCParameter
: public AsnType
1314 AsnInt rc2ParameterVersion
;
1318 RC2CBCParameter (const RC2CBCParameter
&);
1319 virtual ~RC2CBCParameter();
1320 virtual AsnType
*Clone() const;
1322 virtual AsnType
*Copy() const;
1324 RC2CBCParameter
&operator = (const RC2CBCParameter
&);
1325 AsnLen
BEncContent (BUF_TYPE b
);
1326 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
1328 AsnLen
BEnc (BUF_TYPE b
);
1329 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
1330 void Print (ostream
&os
) const;
1334 class ExtendedCertificateOrCertificate
: public AsnType
1340 extendedCertificateCid
= 1
1343 enum ChoiceIdEnum choiceId
;
1346 Certificate
*certificate
;
1347 ExtendedCertificate
*extendedCertificate
;
1351 ExtendedCertificateOrCertificate();
1352 ExtendedCertificateOrCertificate (const ExtendedCertificateOrCertificate
&);
1353 virtual ~ExtendedCertificateOrCertificate();
1355 virtual AsnType
*Clone() const;
1357 virtual AsnType
*Copy() const;
1359 ExtendedCertificateOrCertificate
&operator = (const ExtendedCertificateOrCertificate
&);
1360 AsnLen
BEncContent (BUF_TYPE b
);
1361 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
1362 AsnLen
BEnc (BUF_TYPE b
);
1363 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
1364 void Print (ostream
&os
) const;
1368 class DigestInfo
: public AsnType
1371 DigestAlgorithmIdentifier
*digestAlgorithm
;
1375 DigestInfo (const DigestInfo
&);
1376 virtual ~DigestInfo();
1377 virtual AsnType
*Clone() const;
1379 virtual AsnType
*Copy() const;
1381 DigestInfo
&operator = (const DigestInfo
&);
1382 AsnLen
BEncContent (BUF_TYPE b
);
1383 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
1385 AsnLen
BEnc (BUF_TYPE b
);
1386 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
1387 void Print (ostream
&os
) const;
1391 //------------------------------------------------------------------------------
1392 // externs for value defs
1394 #define sha_1_arc 1, 3, 14, 3, 2, 26
1395 #define sha_1 AsnOid(sha_1_arc)
1396 #define id_dsa_with_sha1_arc 1, 2, 840, 10040, 4, 3
1397 #define id_dsa_with_sha1 AsnOid(id_dsa_with_sha1_arc)
1398 #define dh_public_number_arc 1, 2, 840, 10046, 2, 1
1399 #define dh_public_number AsnOid(dh_public_number_arc)
1400 #define id_alg_ESDH_arc 1, 2, 840, 113549, 1, 9, 16, 3, 5
1401 #define id_alg_ESDH AsnOid(id_alg_ESDH_arc)
1402 #define id_alg_CMS3DESwrap_arc 1, 2, 840, 113549, 1, 9, 16, 3, 6
1403 #define id_alg_CMS3DESwrap AsnOid(id_alg_CMS3DESwrap_arc)
1404 #define id_alg_CMSRC2wrap_arc 1, 2, 840, 113549, 1, 9, 16, 3, 7
1405 #define id_alg_CMSRC2wrap AsnOid(id_alg_CMSRC2wrap_arc)
1406 #define des_ede3_cbc_arc 1, 2, 840, 113549, 3, 7
1407 #define des_ede3_cbc AsnOid(des_ede3_cbc_arc)
1408 #define rc2_cbc_arc 1, 2, 840, 113549, 3, 2
1409 #define rc2_cbc AsnOid(rc2_cbc_arc)
1410 #define hMAC_SHA1_arc 1, 3, 6, 1, 5, 5, 8, 1, 2
1411 #define hMAC_SHA1 AsnOid(hMAC_SHA1_arc)
1412 #define rc2_ecb_arc 1, 2, 840, 113549, 3, 3
1413 #define rc2_ecb AsnOid(rc2_ecb_arc)
1414 #define rc4_arc 1, 2, 840, 113549, 3, 4
1415 #define rc4 AsnOid(rc4_arc)
1416 #define rc4WithMAC_arc 1, 2, 840, 113549, 3, 5
1417 #define rc4WithMAC AsnOid(rc4WithMAC_arc)
1418 #define desx_CBC_arc 1, 2, 840, 113549, 3, 6
1419 #define desx_CBC AsnOid(desx_CBC_arc)
1420 #define rc5CBC_arc 1, 2, 840, 113549, 3, 8
1421 #define rc5CBC AsnOid(rc5CBC_arc)
1422 #define rc5_CBCPad_arc 1, 2, 840, 113549, 3, 9
1423 #define rc5_CBCPad AsnOid(rc5_CBCPad_arc)
1424 #define desCDMF_arc 1, 2, 840, 113549, 3, 10
1425 #define desCDMF AsnOid(desCDMF_arc)
1426 #define dsa_bsafe_arc 1, 3, 14, 3, 2, 12
1427 #define dsa_bsafe AsnOid(dsa_bsafe_arc)
1428 #define id_data_arc 1, 2, 840, 113549, 1, 7, 1
1429 #define id_data AsnOid(id_data_arc)
1430 #define id_signedData_arc 1, 2, 840, 113549, 1, 7, 2
1431 #define id_signedData AsnOid(id_signedData_arc)
1432 #define id_envelopedData_arc 1, 2, 840, 113549, 1, 7, 3
1433 #define id_envelopedData AsnOid(id_envelopedData_arc)
1434 #define id_digestedData_arc 1, 2, 840, 113549, 1, 7, 5
1435 #define id_digestedData AsnOid(id_digestedData_arc)
1436 #define id_encryptedData_arc 1, 2, 840, 113549, 1, 7, 6
1437 #define id_encryptedData AsnOid(id_encryptedData_arc)
1438 #define id_ct_authData_arc 1, 2, 840, 113549, 1, 9, 16, 1, 2
1439 #define id_ct_authData AsnOid(id_ct_authData_arc)
1440 #define id_contentType_arc 1, 2, 840, 113549, 1, 9, 3
1441 #define id_contentType AsnOid(id_contentType_arc)
1442 #define id_messageDigest_arc 1, 2, 840, 113549, 1, 9, 4
1443 #define id_messageDigest AsnOid(id_messageDigest_arc)
1444 #define id_signingTime_arc 1, 2, 840, 113549, 1, 9, 5
1445 #define id_signingTime AsnOid(id_signingTime_arc)
1446 #define id_countersignature_arc 1, 2, 840, 113549, 1, 9, 6
1447 #define id_countersignature AsnOid(id_countersignature_arc)
1448 #define id_macValue_arc 1, 2, 840, 113549, 1, 9, 16, 2, 8
1449 #define id_macValue AsnOid(id_macValue_arc)
1450 #define id_dsa_arc 1, 2, 840, 10040, 4, 1
1451 #define id_dsa AsnOid(id_dsa_arc)
1452 //------------------------------------------------------------------------------
1454 #endif /* conditional include of sm_cms.h */