1 // NOTE: this is a machine generated file--editing not recommended
3 // sm_ess.h - class definitions for ASN.1 module ExtendedSecurityServices
5 // This file was generated by snacc on Wed Jun 27 16:40:55 2001
6 // UBC snacc by Mike Sample
7 // A couple of enhancements made by IBM European Networking Center
13 //------------------------------------------------------------------------------
14 // class declarations:
17 class SecurityClassification
;
18 class SigningCertificateSeqOf1
;
19 class MLReceiptPolicySeqOf1
;
20 class MLReceiptPolicySeqOf
;
21 class ReceiptsFromSeqOf
;
22 class ReceiptRequestSeqOf
;
24 class SecurityCategory
;
25 class EntityIdentifier
;
27 class SecurityCategories
;
28 class MLReceiptPolicy
;
30 class SigningCertificateSeqOf
;
31 class ESSSecurityLabel
;
36 class ContentReference
;
37 class EquivalentLabels
;
38 class MLExpansionHistory
;
39 class SigningCertificate
;
41 //------------------------------------------------------------------------------
44 typedef enum ExtendedSecurityServicesAnyId
47 } ExtendedSecurityServicesAnyId
;
51 typedef AsnOcts ContentIdentifier
;
53 /* INTEGER { allReceipts (0), firstTierRecipients (1) } */
54 class AllOrFirstTier
: public AsnInt
57 AllOrFirstTier(): AsnInt() {}
58 AllOrFirstTier (int i
): AsnInt (i
) {}
62 firstTierRecipients
= 1
68 typedef AsnOcts MsgSigDigest
;
70 /* OBJECT IDENTIFIER */
71 typedef AsnOid SecurityPolicyIdentifier
;
73 /* INTEGER { unmarked (0), unclassified (1), restricted (2), confidential (3), secret (4), top_secret (5) } (0..ub-integer-options) */
74 class SecurityClassification
: public AsnInt
77 SecurityClassification(): AsnInt() {}
78 SecurityClassification (int i
): AsnInt (i
) {}
92 typedef AsnOcts CertHash
;
94 /* OBJECT IDENTIFIER (id-qt-cps) | (id-qt-unotice) */
95 typedef AsnOid PolicyQualifierId
;
97 class SigningCertificateSeqOf1
: public AsnType
100 unsigned long int count
;
105 PolicyInformation
*elmt
;
106 } *first
, *curr
, *last
;
109 SigningCertificateSeqOf1() { count
= 0; first
= curr
= last
= NULL
; }
110 SigningCertificateSeqOf1 (const SigningCertificateSeqOf1
&);
111 virtual ~SigningCertificateSeqOf1();
112 virtual AsnType
*Clone() const;
114 virtual AsnType
*Copy() const;
116 SigningCertificateSeqOf1
&operator = (const SigningCertificateSeqOf1
&);
117 void SetCurrElmt (unsigned long int index
);
118 unsigned long int GetCurrElmtIndex();
119 void SetCurrToFirst() { curr
= first
; }
120 void SetCurrToLast() { curr
= last
; }
121 // reading member fcns
122 int Count() const { return count
; }
123 // NOTE: if your compiler complains about these NULLs, its definition of NULL is broken (and you better change it there!)
124 PolicyInformation
*First() const { return count
> 0 ? first
->elmt
: NULL
; }
125 PolicyInformation
*Last() const { return count
> 0 ? last
->elmt
: NULL
; }
126 PolicyInformation
*Curr() const { return curr
? curr
->elmt
: NULL
; }
127 PolicyInformation
*Next() const { return curr
&& curr
->next
? curr
->next
->elmt
: NULL
; }
128 PolicyInformation
*Prev() const { return curr
&& curr
->prev
? curr
->prev
->elmt
: NULL
; }
130 // routines that move the curr elmt
131 PolicyInformation
*GoNext() { if (curr
) curr
= curr
->next
; return Curr(); }
132 PolicyInformation
*GoPrev() { if (curr
) curr
= curr
->prev
; return Curr(); }
134 // write & alloc fcns - returns new elmt
135 PolicyInformation
*Append(); // add elmt to end of list
136 PolicyInformation
*Prepend(); // add elmt to beginning of list
137 PolicyInformation
*InsertBefore(); //insert elmt before current elmt
138 PolicyInformation
*InsertAfter(); //insert elmt after current elmt
140 // write & alloc & copy - returns list after copying elmt
141 SigningCertificateSeqOf1
&AppendCopy (PolicyInformation
&elmt
); // add elmt to end of list
142 SigningCertificateSeqOf1
&PrependCopy (PolicyInformation
&elmt
); // add elmt to beginning of list
143 SigningCertificateSeqOf1
&InsertBeforeAndCopy (PolicyInformation
&elmt
); //insert elmt before current elmt
144 SigningCertificateSeqOf1
&InsertAfterAndCopy (PolicyInformation
&elmt
); //insert elmt after current elmt
146 // removing the current elmt from the list
147 void RemoveCurrFromList();
149 // encode and decode routines
150 AsnLen
BEnc (BUF_TYPE b
);
151 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
152 AsnLen
BEncContent (BUF_TYPE b
);
153 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
156 void Print (ostream
&os
) const;
160 class MLReceiptPolicySeqOf1
: public AsnType
163 unsigned long int count
;
169 } *first
, *curr
, *last
;
172 MLReceiptPolicySeqOf1() { count
= 0; first
= curr
= last
= NULL
; }
173 MLReceiptPolicySeqOf1 (const MLReceiptPolicySeqOf1
&);
174 virtual ~MLReceiptPolicySeqOf1();
175 virtual AsnType
*Clone() const;
177 virtual AsnType
*Copy() const;
179 MLReceiptPolicySeqOf1
&operator = (const MLReceiptPolicySeqOf1
&);
180 void SetCurrElmt (unsigned long int index
);
181 unsigned long int GetCurrElmtIndex();
182 void SetCurrToFirst() { curr
= first
; }
183 void SetCurrToLast() { curr
= last
; }
184 // reading member fcns
185 int Count() const { return count
; }
186 // NOTE: if your compiler complains about these NULLs, its definition of NULL is broken (and you better change it there!)
187 GeneralNames
*First() const { return count
> 0 ? first
->elmt
: NULL
; }
188 GeneralNames
*Last() const { return count
> 0 ? last
->elmt
: NULL
; }
189 GeneralNames
*Curr() const { return curr
? curr
->elmt
: NULL
; }
190 GeneralNames
*Next() const { return curr
&& curr
->next
? curr
->next
->elmt
: NULL
; }
191 GeneralNames
*Prev() const { return curr
&& curr
->prev
? curr
->prev
->elmt
: NULL
; }
193 // routines that move the curr elmt
194 GeneralNames
*GoNext() { if (curr
) curr
= curr
->next
; return Curr(); }
195 GeneralNames
*GoPrev() { if (curr
) curr
= curr
->prev
; return Curr(); }
197 // write & alloc fcns - returns new elmt
198 GeneralNames
*Append(); // add elmt to end of list
199 GeneralNames
*Prepend(); // add elmt to beginning of list
200 GeneralNames
*InsertBefore(); //insert elmt before current elmt
201 GeneralNames
*InsertAfter(); //insert elmt after current elmt
203 // write & alloc & copy - returns list after copying elmt
204 MLReceiptPolicySeqOf1
&AppendCopy (GeneralNames
&elmt
); // add elmt to end of list
205 MLReceiptPolicySeqOf1
&PrependCopy (GeneralNames
&elmt
); // add elmt to beginning of list
206 MLReceiptPolicySeqOf1
&InsertBeforeAndCopy (GeneralNames
&elmt
); //insert elmt before current elmt
207 MLReceiptPolicySeqOf1
&InsertAfterAndCopy (GeneralNames
&elmt
); //insert elmt after current elmt
209 // removing the current elmt from the list
210 void RemoveCurrFromList();
212 // encode and decode routines
213 AsnLen
BEnc (BUF_TYPE b
);
214 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
215 AsnLen
BEncContent (BUF_TYPE b
);
216 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
219 void Print (ostream
&os
) const;
223 class MLReceiptPolicySeqOf
: public AsnType
226 unsigned long int count
;
232 } *first
, *curr
, *last
;
235 MLReceiptPolicySeqOf() { count
= 0; first
= curr
= last
= NULL
; }
236 MLReceiptPolicySeqOf (const MLReceiptPolicySeqOf
&);
237 virtual ~MLReceiptPolicySeqOf();
238 virtual AsnType
*Clone() const;
240 virtual AsnType
*Copy() const;
242 MLReceiptPolicySeqOf
&operator = (const MLReceiptPolicySeqOf
&);
243 void SetCurrElmt (unsigned long int index
);
244 unsigned long int GetCurrElmtIndex();
245 void SetCurrToFirst() { curr
= first
; }
246 void SetCurrToLast() { curr
= last
; }
247 // reading member fcns
248 int Count() const { return count
; }
249 // NOTE: if your compiler complains about these NULLs, its definition of NULL is broken (and you better change it there!)
250 GeneralNames
*First() const { return count
> 0 ? first
->elmt
: NULL
; }
251 GeneralNames
*Last() const { return count
> 0 ? last
->elmt
: NULL
; }
252 GeneralNames
*Curr() const { return curr
? curr
->elmt
: NULL
; }
253 GeneralNames
*Next() const { return curr
&& curr
->next
? curr
->next
->elmt
: NULL
; }
254 GeneralNames
*Prev() const { return curr
&& curr
->prev
? curr
->prev
->elmt
: NULL
; }
256 // routines that move the curr elmt
257 GeneralNames
*GoNext() { if (curr
) curr
= curr
->next
; return Curr(); }
258 GeneralNames
*GoPrev() { if (curr
) curr
= curr
->prev
; return Curr(); }
260 // write & alloc fcns - returns new elmt
261 GeneralNames
*Append(); // add elmt to end of list
262 GeneralNames
*Prepend(); // add elmt to beginning of list
263 GeneralNames
*InsertBefore(); //insert elmt before current elmt
264 GeneralNames
*InsertAfter(); //insert elmt after current elmt
266 // write & alloc & copy - returns list after copying elmt
267 MLReceiptPolicySeqOf
&AppendCopy (GeneralNames
&elmt
); // add elmt to end of list
268 MLReceiptPolicySeqOf
&PrependCopy (GeneralNames
&elmt
); // add elmt to beginning of list
269 MLReceiptPolicySeqOf
&InsertBeforeAndCopy (GeneralNames
&elmt
); //insert elmt before current elmt
270 MLReceiptPolicySeqOf
&InsertAfterAndCopy (GeneralNames
&elmt
); //insert elmt after current elmt
272 // removing the current elmt from the list
273 void RemoveCurrFromList();
275 // encode and decode routines
276 AsnLen
BEnc (BUF_TYPE b
);
277 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
278 AsnLen
BEncContent (BUF_TYPE b
);
279 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
282 void Print (ostream
&os
) const;
286 class ReceiptsFromSeqOf
: public AsnType
289 unsigned long int count
;
295 } *first
, *curr
, *last
;
298 ReceiptsFromSeqOf() { count
= 0; first
= curr
= last
= NULL
; }
299 ReceiptsFromSeqOf (const ReceiptsFromSeqOf
&);
300 virtual ~ReceiptsFromSeqOf();
301 virtual AsnType
*Clone() const;
303 virtual AsnType
*Copy() const;
305 ReceiptsFromSeqOf
&operator = (const ReceiptsFromSeqOf
&);
306 void SetCurrElmt (unsigned long int index
);
307 unsigned long int GetCurrElmtIndex();
308 void SetCurrToFirst() { curr
= first
; }
309 void SetCurrToLast() { curr
= last
; }
310 // reading member fcns
311 int Count() const { return count
; }
312 // NOTE: if your compiler complains about these NULLs, its definition of NULL is broken (and you better change it there!)
313 GeneralNames
*First() const { return count
> 0 ? first
->elmt
: NULL
; }
314 GeneralNames
*Last() const { return count
> 0 ? last
->elmt
: NULL
; }
315 GeneralNames
*Curr() const { return curr
? curr
->elmt
: NULL
; }
316 GeneralNames
*Next() const { return curr
&& curr
->next
? curr
->next
->elmt
: NULL
; }
317 GeneralNames
*Prev() const { return curr
&& curr
->prev
? curr
->prev
->elmt
: NULL
; }
319 // routines that move the curr elmt
320 GeneralNames
*GoNext() { if (curr
) curr
= curr
->next
; return Curr(); }
321 GeneralNames
*GoPrev() { if (curr
) curr
= curr
->prev
; return Curr(); }
323 // write & alloc fcns - returns new elmt
324 GeneralNames
*Append(); // add elmt to end of list
325 GeneralNames
*Prepend(); // add elmt to beginning of list
326 GeneralNames
*InsertBefore(); //insert elmt before current elmt
327 GeneralNames
*InsertAfter(); //insert elmt after current elmt
329 // write & alloc & copy - returns list after copying elmt
330 ReceiptsFromSeqOf
&AppendCopy (GeneralNames
&elmt
); // add elmt to end of list
331 ReceiptsFromSeqOf
&PrependCopy (GeneralNames
&elmt
); // add elmt to beginning of list
332 ReceiptsFromSeqOf
&InsertBeforeAndCopy (GeneralNames
&elmt
); //insert elmt before current elmt
333 ReceiptsFromSeqOf
&InsertAfterAndCopy (GeneralNames
&elmt
); //insert elmt after current elmt
335 // removing the current elmt from the list
336 void RemoveCurrFromList();
338 // encode and decode routines
339 AsnLen
BEnc (BUF_TYPE b
);
340 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
341 AsnLen
BEncContent (BUF_TYPE b
);
342 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
345 void Print (ostream
&os
) const;
349 class ReceiptRequestSeqOf
: public AsnType
352 unsigned long int count
;
358 } *first
, *curr
, *last
;
361 ReceiptRequestSeqOf() { count
= 0; first
= curr
= last
= NULL
; }
362 ReceiptRequestSeqOf (const ReceiptRequestSeqOf
&);
363 virtual ~ReceiptRequestSeqOf();
364 virtual AsnType
*Clone() const;
366 virtual AsnType
*Copy() const;
368 ReceiptRequestSeqOf
&operator = (const ReceiptRequestSeqOf
&);
369 void SetCurrElmt (unsigned long int index
);
370 unsigned long int GetCurrElmtIndex();
371 void SetCurrToFirst() { curr
= first
; }
372 void SetCurrToLast() { curr
= last
; }
373 // reading member fcns
374 int Count() const { return count
; }
375 // NOTE: if your compiler complains about these NULLs, its definition of NULL is broken (and you better change it there!)
376 GeneralNames
*First() const { return count
> 0 ? first
->elmt
: NULL
; }
377 GeneralNames
*Last() const { return count
> 0 ? last
->elmt
: NULL
; }
378 GeneralNames
*Curr() const { return curr
? curr
->elmt
: NULL
; }
379 GeneralNames
*Next() const { return curr
&& curr
->next
? curr
->next
->elmt
: NULL
; }
380 GeneralNames
*Prev() const { return curr
&& curr
->prev
? curr
->prev
->elmt
: NULL
; }
382 // routines that move the curr elmt
383 GeneralNames
*GoNext() { if (curr
) curr
= curr
->next
; return Curr(); }
384 GeneralNames
*GoPrev() { if (curr
) curr
= curr
->prev
; return Curr(); }
386 // write & alloc fcns - returns new elmt
387 GeneralNames
*Append(); // add elmt to end of list
388 GeneralNames
*Prepend(); // add elmt to beginning of list
389 GeneralNames
*InsertBefore(); //insert elmt before current elmt
390 GeneralNames
*InsertAfter(); //insert elmt after current elmt
392 // write & alloc & copy - returns list after copying elmt
393 ReceiptRequestSeqOf
&AppendCopy (GeneralNames
&elmt
); // add elmt to end of list
394 ReceiptRequestSeqOf
&PrependCopy (GeneralNames
&elmt
); // add elmt to beginning of list
395 ReceiptRequestSeqOf
&InsertBeforeAndCopy (GeneralNames
&elmt
); //insert elmt before current elmt
396 ReceiptRequestSeqOf
&InsertAfterAndCopy (GeneralNames
&elmt
); //insert elmt after current elmt
398 // removing the current elmt from the list
399 void RemoveCurrFromList();
401 // encode and decode routines
402 AsnLen
BEnc (BUF_TYPE b
);
403 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
404 AsnLen
BEncContent (BUF_TYPE b
);
405 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
408 void Print (ostream
&os
) const;
412 class ESSPrivacyMark
: public AsnType
421 enum ChoiceIdEnum choiceId
;
424 PrintableString
*pString
;
425 UTF8String
*utf8String
;
430 ESSPrivacyMark (const ESSPrivacyMark
&);
431 virtual ~ESSPrivacyMark();
433 virtual AsnType
*Clone() const;
435 virtual AsnType
*Copy() const;
437 ESSPrivacyMark
&operator = (const ESSPrivacyMark
&);
438 AsnLen
BEncContent (BUF_TYPE b
);
439 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
440 AsnLen
BEnc (BUF_TYPE b
);
441 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
442 int BEncPdu (BUF_TYPE b
, AsnLen
&bytesEncoded
);
443 int BDecPdu (BUF_TYPE b
, AsnLen
&bytesDecoded
);
445 void Print (ostream
&os
) const;
449 class SecurityCategory
: public AsnType
456 SecurityCategory (const SecurityCategory
&);
457 virtual ~SecurityCategory();
458 virtual AsnType
*Clone() const;
460 virtual AsnType
*Copy() const;
462 SecurityCategory
&operator = (const SecurityCategory
&);
463 AsnLen
BEncContent (BUF_TYPE b
);
464 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
466 AsnLen
BEnc (BUF_TYPE b
);
467 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
468 int BEncPdu (BUF_TYPE b
, AsnLen
&bytesEncoded
);
469 int BDecPdu (BUF_TYPE b
, AsnLen
&bytesDecoded
);
471 void Print (ostream
&os
) const;
475 class EntityIdentifier
: public AsnType
480 issuerAndSerialNumberCid
= 0,
481 subjectKeyIdentifierCid
= 1
484 enum ChoiceIdEnum choiceId
;
487 IssuerAndSerialNumber
*issuerAndSerialNumber
;
488 KeyIdentifier
*subjectKeyIdentifier
;
493 EntityIdentifier (const EntityIdentifier
&);
494 virtual ~EntityIdentifier();
496 virtual AsnType
*Clone() const;
498 virtual AsnType
*Copy() const;
500 EntityIdentifier
&operator = (const EntityIdentifier
&);
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 int BEncPdu (BUF_TYPE b
, AsnLen
&bytesEncoded
);
506 int BDecPdu (BUF_TYPE b
, AsnLen
&bytesDecoded
);
508 void Print (ostream
&os
) const;
512 class ReceiptsFrom
: public AsnType
517 allOrFirstTierCid
= 0,
521 enum ChoiceIdEnum choiceId
;
524 AllOrFirstTier
*allOrFirstTier
;
525 ReceiptsFromSeqOf
*receiptList
;
530 ReceiptsFrom (const ReceiptsFrom
&);
531 virtual ~ReceiptsFrom();
533 virtual AsnType
*Clone() const;
535 virtual AsnType
*Copy() const;
537 ReceiptsFrom
&operator = (const ReceiptsFrom
&);
538 AsnLen
BEncContent (BUF_TYPE b
);
539 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
540 AsnLen
BEnc (BUF_TYPE b
);
541 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
542 int BEncPdu (BUF_TYPE b
, AsnLen
&bytesEncoded
);
543 int BDecPdu (BUF_TYPE b
, AsnLen
&bytesDecoded
);
545 void Print (ostream
&os
) const;
549 class SecurityCategories
: public AsnType
552 unsigned long int count
;
557 SecurityCategory
*elmt
;
558 } *first
, *curr
, *last
;
561 SecurityCategories() { count
= 0; first
= curr
= last
= NULL
; }
562 SecurityCategories (const SecurityCategories
&);
563 virtual ~SecurityCategories();
564 virtual AsnType
*Clone() const;
566 virtual AsnType
*Copy() const;
568 SecurityCategories
&operator = (const SecurityCategories
&);
569 void SetCurrElmt (unsigned long int index
);
570 unsigned long int GetCurrElmtIndex();
571 void SetCurrToFirst() { curr
= first
; }
572 void SetCurrToLast() { curr
= last
; }
573 // reading member fcns
574 int Count() const { return count
; }
575 // NOTE: if your compiler complains about these NULLs, its definition of NULL is broken (and you better change it there!)
576 SecurityCategory
*First() const { return count
> 0 ? first
->elmt
: NULL
; }
577 SecurityCategory
*Last() const { return count
> 0 ? last
->elmt
: NULL
; }
578 SecurityCategory
*Curr() const { return curr
? curr
->elmt
: NULL
; }
579 SecurityCategory
*Next() const { return curr
&& curr
->next
? curr
->next
->elmt
: NULL
; }
580 SecurityCategory
*Prev() const { return curr
&& curr
->prev
? curr
->prev
->elmt
: NULL
; }
582 // routines that move the curr elmt
583 SecurityCategory
*GoNext() { if (curr
) curr
= curr
->next
; return Curr(); }
584 SecurityCategory
*GoPrev() { if (curr
) curr
= curr
->prev
; return Curr(); }
586 // write & alloc fcns - returns new elmt
587 SecurityCategory
*Append(); // add elmt to end of list
588 SecurityCategory
*Prepend(); // add elmt to beginning of list
589 SecurityCategory
*InsertBefore(); //insert elmt before current elmt
590 SecurityCategory
*InsertAfter(); //insert elmt after current elmt
592 // write & alloc & copy - returns list after copying elmt
593 SecurityCategories
&AppendCopy (SecurityCategory
&elmt
); // add elmt to end of list
594 SecurityCategories
&PrependCopy (SecurityCategory
&elmt
); // add elmt to beginning of list
595 SecurityCategories
&InsertBeforeAndCopy (SecurityCategory
&elmt
); //insert elmt before current elmt
596 SecurityCategories
&InsertAfterAndCopy (SecurityCategory
&elmt
); //insert elmt after current elmt
598 // removing the current elmt from the list
599 void RemoveCurrFromList();
601 // encode and decode routines
602 AsnLen
BEnc (BUF_TYPE b
);
603 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
604 AsnLen
BEncContent (BUF_TYPE b
);
605 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
608 void Print (ostream
&os
) const;
612 class MLReceiptPolicy
: public AsnType
622 enum ChoiceIdEnum choiceId
;
626 MLReceiptPolicySeqOf
*insteadOf
;
627 MLReceiptPolicySeqOf1
*inAdditionTo
;
632 MLReceiptPolicy (const MLReceiptPolicy
&);
633 virtual ~MLReceiptPolicy();
635 virtual AsnType
*Clone() const;
637 virtual AsnType
*Copy() const;
639 MLReceiptPolicy
&operator = (const MLReceiptPolicy
&);
640 AsnLen
BEncContent (BUF_TYPE b
);
641 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
642 AsnLen
BEnc (BUF_TYPE b
);
643 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
644 int BEncPdu (BUF_TYPE b
, AsnLen
&bytesEncoded
);
645 int BDecPdu (BUF_TYPE b
, AsnLen
&bytesDecoded
);
647 void Print (ostream
&os
) const;
651 class ESSCertID
: public AsnType
655 IssuerSerial
*issuerSerial
;
658 ESSCertID (const ESSCertID
&);
659 virtual ~ESSCertID();
660 virtual AsnType
*Clone() const;
662 virtual AsnType
*Copy() const;
664 ESSCertID
&operator = (const ESSCertID
&);
665 AsnLen
BEncContent (BUF_TYPE b
);
666 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
668 AsnLen
BEnc (BUF_TYPE b
);
669 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
670 int BEncPdu (BUF_TYPE b
, AsnLen
&bytesEncoded
);
671 int BDecPdu (BUF_TYPE b
, AsnLen
&bytesDecoded
);
673 void Print (ostream
&os
) const;
677 class SigningCertificateSeqOf
: public AsnType
680 unsigned long int count
;
686 } *first
, *curr
, *last
;
689 SigningCertificateSeqOf() { count
= 0; first
= curr
= last
= NULL
; }
690 SigningCertificateSeqOf (const SigningCertificateSeqOf
&);
691 virtual ~SigningCertificateSeqOf();
692 virtual AsnType
*Clone() const;
694 virtual AsnType
*Copy() const;
696 SigningCertificateSeqOf
&operator = (const SigningCertificateSeqOf
&);
697 void SetCurrElmt (unsigned long int index
);
698 unsigned long int GetCurrElmtIndex();
699 void SetCurrToFirst() { curr
= first
; }
700 void SetCurrToLast() { curr
= last
; }
701 // reading member fcns
702 int Count() const { return count
; }
703 // NOTE: if your compiler complains about these NULLs, its definition of NULL is broken (and you better change it there!)
704 ESSCertID
*First() const { return count
> 0 ? first
->elmt
: NULL
; }
705 ESSCertID
*Last() const { return count
> 0 ? last
->elmt
: NULL
; }
706 ESSCertID
*Curr() const { return curr
? curr
->elmt
: NULL
; }
707 ESSCertID
*Next() const { return curr
&& curr
->next
? curr
->next
->elmt
: NULL
; }
708 ESSCertID
*Prev() const { return curr
&& curr
->prev
? curr
->prev
->elmt
: NULL
; }
710 // routines that move the curr elmt
711 ESSCertID
*GoNext() { if (curr
) curr
= curr
->next
; return Curr(); }
712 ESSCertID
*GoPrev() { if (curr
) curr
= curr
->prev
; return Curr(); }
714 // write & alloc fcns - returns new elmt
715 ESSCertID
*Append(); // add elmt to end of list
716 ESSCertID
*Prepend(); // add elmt to beginning of list
717 ESSCertID
*InsertBefore(); //insert elmt before current elmt
718 ESSCertID
*InsertAfter(); //insert elmt after current elmt
720 // write & alloc & copy - returns list after copying elmt
721 SigningCertificateSeqOf
&AppendCopy (ESSCertID
&elmt
); // add elmt to end of list
722 SigningCertificateSeqOf
&PrependCopy (ESSCertID
&elmt
); // add elmt to beginning of list
723 SigningCertificateSeqOf
&InsertBeforeAndCopy (ESSCertID
&elmt
); //insert elmt before current elmt
724 SigningCertificateSeqOf
&InsertAfterAndCopy (ESSCertID
&elmt
); //insert elmt after current elmt
726 // removing the current elmt from the list
727 void RemoveCurrFromList();
729 // encode and decode routines
730 AsnLen
BEnc (BUF_TYPE b
);
731 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
732 AsnLen
BEncContent (BUF_TYPE b
);
733 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
736 void Print (ostream
&os
) const;
740 class ESSSecurityLabel
: public AsnType
743 SecurityPolicyIdentifier security_policy_identifier
;
744 SecurityClassification
*security_classification
;
745 ESSPrivacyMark
*privacy_mark
;
746 SecurityCategories
*security_categories
;
749 ESSSecurityLabel (const ESSSecurityLabel
&);
750 virtual ~ESSSecurityLabel();
751 virtual AsnType
*Clone() const;
753 virtual AsnType
*Copy() const;
755 ESSSecurityLabel
&operator = (const ESSSecurityLabel
&);
756 AsnLen
BEncContent (BUF_TYPE b
);
757 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
759 AsnLen
BEnc (BUF_TYPE b
);
760 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
761 int BEncPdu (BUF_TYPE b
, AsnLen
&bytesEncoded
);
762 int BDecPdu (BUF_TYPE b
, AsnLen
&bytesDecoded
);
764 void Print (ostream
&os
) const;
768 class MLData
: public AsnType
771 EntityIdentifier
*mailListIdentifier
;
772 GeneralizedTime expansionTime
;
773 MLReceiptPolicy
*mlReceiptPolicy
;
776 MLData (const MLData
&);
778 virtual AsnType
*Clone() const;
780 virtual AsnType
*Copy() const;
782 MLData
&operator = (const MLData
&);
783 AsnLen
BEncContent (BUF_TYPE b
);
784 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
786 AsnLen
BEnc (BUF_TYPE b
);
787 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
788 int BEncPdu (BUF_TYPE b
, AsnLen
&bytesEncoded
);
789 int BDecPdu (BUF_TYPE b
, AsnLen
&bytesDecoded
);
791 void Print (ostream
&os
) const;
795 class ReceiptRequest
: public AsnType
798 ContentIdentifier signedContentIdentifier
;
799 ReceiptsFrom
*receiptsFrom
;
800 ReceiptRequestSeqOf receiptsTo
;
803 ReceiptRequest (const ReceiptRequest
&);
804 virtual ~ReceiptRequest();
805 virtual AsnType
*Clone() const;
807 virtual AsnType
*Copy() const;
809 ReceiptRequest
&operator = (const ReceiptRequest
&);
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 int BEncPdu (BUF_TYPE b
, AsnLen
&bytesEncoded
);
816 int BDecPdu (BUF_TYPE b
, AsnLen
&bytesDecoded
);
818 void Print (ostream
&os
) const;
822 class Receipt
: public AsnType
826 ContentType contentType
;
827 ContentIdentifier signedContentIdentifier
;
828 AsnOcts originatorSignatureValue
;
831 Receipt (const Receipt
&);
833 virtual AsnType
*Clone() const;
835 virtual AsnType
*Copy() const;
837 Receipt
&operator = (const Receipt
&);
838 AsnLen
BEncContent (BUF_TYPE b
);
839 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
841 AsnLen
BEnc (BUF_TYPE b
);
842 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
843 int BEncPdu (BUF_TYPE b
, AsnLen
&bytesEncoded
);
844 int BDecPdu (BUF_TYPE b
, AsnLen
&bytesDecoded
);
846 void Print (ostream
&os
) const;
850 class ContentHints
: public AsnType
853 UTF8String
*contentDescription
;
854 ContentType contentType
;
857 ContentHints (const ContentHints
&);
858 virtual ~ContentHints();
859 virtual AsnType
*Clone() const;
861 virtual AsnType
*Copy() const;
863 ContentHints
&operator = (const ContentHints
&);
864 AsnLen
BEncContent (BUF_TYPE b
);
865 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
867 AsnLen
BEnc (BUF_TYPE b
);
868 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
869 int BEncPdu (BUF_TYPE b
, AsnLen
&bytesEncoded
);
870 int BDecPdu (BUF_TYPE b
, AsnLen
&bytesDecoded
);
872 void Print (ostream
&os
) const;
876 class ContentReference
: public AsnType
879 ContentType contentType
;
880 ContentIdentifier signedContentIdentifier
;
881 AsnOcts originatorSignatureValue
;
884 ContentReference (const ContentReference
&);
885 virtual ~ContentReference();
886 virtual AsnType
*Clone() const;
888 virtual AsnType
*Copy() const;
890 ContentReference
&operator = (const ContentReference
&);
891 AsnLen
BEncContent (BUF_TYPE b
);
892 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
894 AsnLen
BEnc (BUF_TYPE b
);
895 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
896 int BEncPdu (BUF_TYPE b
, AsnLen
&bytesEncoded
);
897 int BDecPdu (BUF_TYPE b
, AsnLen
&bytesDecoded
);
899 void Print (ostream
&os
) const;
903 class EquivalentLabels
: public AsnType
906 unsigned long int count
;
911 ESSSecurityLabel
*elmt
;
912 } *first
, *curr
, *last
;
915 EquivalentLabels() { count
= 0; first
= curr
= last
= NULL
; }
916 EquivalentLabels (const EquivalentLabels
&);
917 virtual ~EquivalentLabels();
918 virtual AsnType
*Clone() const;
920 virtual AsnType
*Copy() const;
922 EquivalentLabels
&operator = (const EquivalentLabels
&);
923 void SetCurrElmt (unsigned long int index
);
924 unsigned long int GetCurrElmtIndex();
925 void SetCurrToFirst() { curr
= first
; }
926 void SetCurrToLast() { curr
= last
; }
927 // reading member fcns
928 int Count() const { return count
; }
929 // NOTE: if your compiler complains about these NULLs, its definition of NULL is broken (and you better change it there!)
930 ESSSecurityLabel
*First() const { return count
> 0 ? first
->elmt
: NULL
; }
931 ESSSecurityLabel
*Last() const { return count
> 0 ? last
->elmt
: NULL
; }
932 ESSSecurityLabel
*Curr() const { return curr
? curr
->elmt
: NULL
; }
933 ESSSecurityLabel
*Next() const { return curr
&& curr
->next
? curr
->next
->elmt
: NULL
; }
934 ESSSecurityLabel
*Prev() const { return curr
&& curr
->prev
? curr
->prev
->elmt
: NULL
; }
936 // routines that move the curr elmt
937 ESSSecurityLabel
*GoNext() { if (curr
) curr
= curr
->next
; return Curr(); }
938 ESSSecurityLabel
*GoPrev() { if (curr
) curr
= curr
->prev
; return Curr(); }
940 // write & alloc fcns - returns new elmt
941 ESSSecurityLabel
*Append(); // add elmt to end of list
942 ESSSecurityLabel
*Prepend(); // add elmt to beginning of list
943 ESSSecurityLabel
*InsertBefore(); //insert elmt before current elmt
944 ESSSecurityLabel
*InsertAfter(); //insert elmt after current elmt
946 // write & alloc & copy - returns list after copying elmt
947 EquivalentLabels
&AppendCopy (ESSSecurityLabel
&elmt
); // add elmt to end of list
948 EquivalentLabels
&PrependCopy (ESSSecurityLabel
&elmt
); // add elmt to beginning of list
949 EquivalentLabels
&InsertBeforeAndCopy (ESSSecurityLabel
&elmt
); //insert elmt before current elmt
950 EquivalentLabels
&InsertAfterAndCopy (ESSSecurityLabel
&elmt
); //insert elmt after current elmt
952 // removing the current elmt from the list
953 void RemoveCurrFromList();
955 // encode and decode routines
956 AsnLen
BEnc (BUF_TYPE b
);
957 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
958 AsnLen
BEncContent (BUF_TYPE b
);
959 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
962 void Print (ostream
&os
) const;
966 class MLExpansionHistory
: public AsnType
969 unsigned long int count
;
975 } *first
, *curr
, *last
;
978 MLExpansionHistory() { count
= 0; first
= curr
= last
= NULL
; }
979 MLExpansionHistory (const MLExpansionHistory
&);
980 virtual ~MLExpansionHistory();
981 virtual AsnType
*Clone() const;
983 virtual AsnType
*Copy() const;
985 MLExpansionHistory
&operator = (const MLExpansionHistory
&);
986 void SetCurrElmt (unsigned long int index
);
987 unsigned long int GetCurrElmtIndex();
988 void SetCurrToFirst() { curr
= first
; }
989 void SetCurrToLast() { curr
= last
; }
990 // reading member fcns
991 int Count() const { return count
; }
992 // NOTE: if your compiler complains about these NULLs, its definition of NULL is broken (and you better change it there!)
993 MLData
*First() const { return count
> 0 ? first
->elmt
: NULL
; }
994 MLData
*Last() const { return count
> 0 ? last
->elmt
: NULL
; }
995 MLData
*Curr() const { return curr
? curr
->elmt
: NULL
; }
996 MLData
*Next() const { return curr
&& curr
->next
? curr
->next
->elmt
: NULL
; }
997 MLData
*Prev() const { return curr
&& curr
->prev
? curr
->prev
->elmt
: NULL
; }
999 // routines that move the curr elmt
1000 MLData
*GoNext() { if (curr
) curr
= curr
->next
; return Curr(); }
1001 MLData
*GoPrev() { if (curr
) curr
= curr
->prev
; return Curr(); }
1003 // write & alloc fcns - returns new elmt
1004 MLData
*Append(); // add elmt to end of list
1005 MLData
*Prepend(); // add elmt to beginning of list
1006 MLData
*InsertBefore(); //insert elmt before current elmt
1007 MLData
*InsertAfter(); //insert elmt after current elmt
1009 // write & alloc & copy - returns list after copying elmt
1010 MLExpansionHistory
&AppendCopy (MLData
&elmt
); // add elmt to end of list
1011 MLExpansionHistory
&PrependCopy (MLData
&elmt
); // add elmt to beginning of list
1012 MLExpansionHistory
&InsertBeforeAndCopy (MLData
&elmt
); //insert elmt before current elmt
1013 MLExpansionHistory
&InsertAfterAndCopy (MLData
&elmt
); //insert elmt after current elmt
1015 // removing the current elmt from the list
1016 void RemoveCurrFromList();
1018 // encode and decode routines
1019 AsnLen
BEnc (BUF_TYPE b
);
1020 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
1021 AsnLen
BEncContent (BUF_TYPE b
);
1022 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
1025 void Print (ostream
&os
) const;
1029 class SigningCertificate
: public AsnType
1032 SigningCertificateSeqOf certs
;
1033 SigningCertificateSeqOf1
*policies
;
1035 SigningCertificate();
1036 SigningCertificate (const SigningCertificate
&);
1037 virtual ~SigningCertificate();
1038 virtual AsnType
*Clone() const;
1040 virtual AsnType
*Copy() const;
1042 SigningCertificate
&operator = (const SigningCertificate
&);
1043 AsnLen
BEncContent (BUF_TYPE b
);
1044 void BDecContent (BUF_TYPE b
, AsnTag tag
, AsnLen elmtLen
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
1046 AsnLen
BEnc (BUF_TYPE b
);
1047 void BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
);
1048 int BEncPdu (BUF_TYPE b
, AsnLen
&bytesEncoded
);
1049 int BDecPdu (BUF_TYPE b
, AsnLen
&bytesDecoded
);
1051 void Print (ostream
&os
) const;
1055 //------------------------------------------------------------------------------
1056 // externs for value defs
1058 #define ub_receiptsTo_val 16
1059 #define ub_receiptsTo AsnInt(ub_receiptsTo_val)
1060 #define smime_arc 1, 2, 840, 113549, 1, 9, 16
1061 #define smime AsnOid(smime_arc)
1062 #define id_aa_arc 1, 2, 840, 113549, 1, 9, 16, 2
1063 #define id_aa AsnOid(id_aa_arc)
1064 #define id_aa_receiptRequest_arc 1, 2, 840, 113549, 1, 9, 16, 2, 1
1065 #define id_aa_receiptRequest AsnOid(id_aa_receiptRequest_arc)
1066 #define id_aa_contentIdentifier_arc 1, 2, 840, 113549, 1, 9, 16, 2, 7
1067 #define id_aa_contentIdentifier AsnOid(id_aa_contentIdentifier_arc)
1068 #define id_ct_receipt_arc 1, 2, 840, 113549, 1, 9, 16, 1, 1
1069 #define id_ct_receipt AsnOid(id_ct_receipt_arc)
1070 #define id_aa_contentHint_arc 1, 2, 840, 113549, 1, 9, 16, 2, 4
1071 #define id_aa_contentHint AsnOid(id_aa_contentHint_arc)
1072 #define id_aa_msgSigDigest_arc 1, 2, 840, 113549, 1, 9, 16, 2, 5
1073 #define id_aa_msgSigDigest AsnOid(id_aa_msgSigDigest_arc)
1074 #define id_aa_contentReference_arc 1, 2, 840, 113549, 1, 9, 16, 2, 10
1075 #define id_aa_contentReference AsnOid(id_aa_contentReference_arc)
1076 #define id_aa_securityLabel_arc 1, 2, 840, 113549, 1, 9, 16, 2, 2
1077 #define id_aa_securityLabel AsnOid(id_aa_securityLabel_arc)
1078 #define id_aa_equivalentLabels_arc 1, 2, 840, 113549, 1, 9, 16, 2, 9
1079 #define id_aa_equivalentLabels AsnOid(id_aa_equivalentLabels_arc)
1080 #define id_aa_mlExpandHistory_arc 1, 2, 840, 113549, 1, 9, 16, 2, 3
1081 #define id_aa_mlExpandHistory AsnOid(id_aa_mlExpandHistory_arc)
1082 #define ub_ml_expansion_history_val 64
1083 #define ub_ml_expansion_history AsnInt(ub_ml_expansion_history_val)
1084 #define id_aa_signingCertificate_arc 1, 2, 840, 113549, 1, 9, 16, 2, 4444
1085 #define id_aa_signingCertificate AsnOid(id_aa_signingCertificate_arc)
1086 #define id_pkix_arc 1, 3, 6, 1, 5, 5, 7
1087 #define id_pkix AsnOid(id_pkix_arc)
1088 #define id_qt_arc 1, 3, 6, 1, 5, 5, 7, 2
1089 #define id_qt AsnOid(id_qt_arc)
1090 #define id_qt_cps_arc 1, 3, 6, 1, 5, 5, 7, 2, 1
1091 #define id_qt_cps AsnOid(id_qt_cps_arc)
1092 #define id_qt_unotice_arc 1, 3, 6, 1, 5, 5, 7, 2, 2
1093 #define id_qt_unotice AsnOid(id_qt_unotice_arc)
1094 //------------------------------------------------------------------------------
1096 #endif /* conditional include of sm_ess.h */