]> git.saurik.com Git - apple/security.git/blob - SecurityASN1/inc/sm_ess.h
Security-54.1.tar.gz
[apple/security.git] / SecurityASN1 / inc / sm_ess.h
1 // NOTE: this is a machine generated file--editing not recommended
2 //
3 // sm_ess.h - class definitions for ASN.1 module ExtendedSecurityServices
4 //
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
8
9 #ifndef _sm_ess_h_
10 #define _sm_ess_h_
11
12
13 //------------------------------------------------------------------------------
14 // class declarations:
15
16 class AllOrFirstTier;
17 class SecurityClassification;
18 class SigningCertificateSeqOf1;
19 class MLReceiptPolicySeqOf1;
20 class MLReceiptPolicySeqOf;
21 class ReceiptsFromSeqOf;
22 class ReceiptRequestSeqOf;
23 class ESSPrivacyMark;
24 class SecurityCategory;
25 class EntityIdentifier;
26 class ReceiptsFrom;
27 class SecurityCategories;
28 class MLReceiptPolicy;
29 class ESSCertID;
30 class SigningCertificateSeqOf;
31 class ESSSecurityLabel;
32 class MLData;
33 class ReceiptRequest;
34 class Receipt;
35 class ContentHints;
36 class ContentReference;
37 class EquivalentLabels;
38 class MLExpansionHistory;
39 class SigningCertificate;
40
41 //------------------------------------------------------------------------------
42 // class definitions:
43
44 typedef enum ExtendedSecurityServicesAnyId
45 {
46
47 } ExtendedSecurityServicesAnyId;
48
49
50 /* OCTET STRING */
51 typedef AsnOcts ContentIdentifier;
52
53 /* INTEGER { allReceipts (0), firstTierRecipients (1) } */
54 class AllOrFirstTier: public AsnInt
55 {
56 public:
57 AllOrFirstTier(): AsnInt() {}
58 AllOrFirstTier (int i): AsnInt (i) {}
59 enum
60 {
61 allReceipts = 0,
62 firstTierRecipients = 1
63 };
64 };
65
66
67 /* OCTET STRING */
68 typedef AsnOcts MsgSigDigest;
69
70 /* OBJECT IDENTIFIER */
71 typedef AsnOid SecurityPolicyIdentifier;
72
73 /* INTEGER { unmarked (0), unclassified (1), restricted (2), confidential (3), secret (4), top_secret (5) } (0..ub-integer-options) */
74 class SecurityClassification: public AsnInt
75 {
76 public:
77 SecurityClassification(): AsnInt() {}
78 SecurityClassification (int i): AsnInt (i) {}
79 enum
80 {
81 unmarked = 0,
82 unclassified = 1,
83 restricted = 2,
84 confidential = 3,
85 secret = 4,
86 top_secret = 5
87 };
88 };
89
90
91 /* OCTET STRING */
92 typedef AsnOcts CertHash;
93
94 /* OBJECT IDENTIFIER (id-qt-cps) | (id-qt-unotice) */
95 typedef AsnOid PolicyQualifierId;
96
97 class SigningCertificateSeqOf1: public AsnType
98 {
99 protected:
100 unsigned long int count;
101 struct AsnListElmt
102 {
103 AsnListElmt *next;
104 AsnListElmt *prev;
105 PolicyInformation *elmt;
106 } *first, *curr, *last;
107
108 public:
109 SigningCertificateSeqOf1() { count = 0; first = curr = last = NULL; }
110 SigningCertificateSeqOf1 (const SigningCertificateSeqOf1 &);
111 virtual ~SigningCertificateSeqOf1();
112 virtual AsnType *Clone() const;
113
114 virtual AsnType *Copy() const;
115
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; }
129
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(); }
133
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
139
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
145
146 // removing the current elmt from the list
147 void RemoveCurrFromList();
148
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);
154
155 PDU_MEMBER_MACROS
156 void Print (ostream &os) const;
157 };
158
159
160 class MLReceiptPolicySeqOf1: public AsnType
161 {
162 protected:
163 unsigned long int count;
164 struct AsnListElmt
165 {
166 AsnListElmt *next;
167 AsnListElmt *prev;
168 GeneralNames *elmt;
169 } *first, *curr, *last;
170
171 public:
172 MLReceiptPolicySeqOf1() { count = 0; first = curr = last = NULL; }
173 MLReceiptPolicySeqOf1 (const MLReceiptPolicySeqOf1 &);
174 virtual ~MLReceiptPolicySeqOf1();
175 virtual AsnType *Clone() const;
176
177 virtual AsnType *Copy() const;
178
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; }
192
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(); }
196
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
202
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
208
209 // removing the current elmt from the list
210 void RemoveCurrFromList();
211
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);
217
218 PDU_MEMBER_MACROS
219 void Print (ostream &os) const;
220 };
221
222
223 class MLReceiptPolicySeqOf: public AsnType
224 {
225 protected:
226 unsigned long int count;
227 struct AsnListElmt
228 {
229 AsnListElmt *next;
230 AsnListElmt *prev;
231 GeneralNames *elmt;
232 } *first, *curr, *last;
233
234 public:
235 MLReceiptPolicySeqOf() { count = 0; first = curr = last = NULL; }
236 MLReceiptPolicySeqOf (const MLReceiptPolicySeqOf &);
237 virtual ~MLReceiptPolicySeqOf();
238 virtual AsnType *Clone() const;
239
240 virtual AsnType *Copy() const;
241
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; }
255
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(); }
259
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
265
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
271
272 // removing the current elmt from the list
273 void RemoveCurrFromList();
274
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);
280
281 PDU_MEMBER_MACROS
282 void Print (ostream &os) const;
283 };
284
285
286 class ReceiptsFromSeqOf: public AsnType
287 {
288 protected:
289 unsigned long int count;
290 struct AsnListElmt
291 {
292 AsnListElmt *next;
293 AsnListElmt *prev;
294 GeneralNames *elmt;
295 } *first, *curr, *last;
296
297 public:
298 ReceiptsFromSeqOf() { count = 0; first = curr = last = NULL; }
299 ReceiptsFromSeqOf (const ReceiptsFromSeqOf &);
300 virtual ~ReceiptsFromSeqOf();
301 virtual AsnType *Clone() const;
302
303 virtual AsnType *Copy() const;
304
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; }
318
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(); }
322
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
328
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
334
335 // removing the current elmt from the list
336 void RemoveCurrFromList();
337
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);
343
344 PDU_MEMBER_MACROS
345 void Print (ostream &os) const;
346 };
347
348
349 class ReceiptRequestSeqOf: public AsnType
350 {
351 protected:
352 unsigned long int count;
353 struct AsnListElmt
354 {
355 AsnListElmt *next;
356 AsnListElmt *prev;
357 GeneralNames *elmt;
358 } *first, *curr, *last;
359
360 public:
361 ReceiptRequestSeqOf() { count = 0; first = curr = last = NULL; }
362 ReceiptRequestSeqOf (const ReceiptRequestSeqOf &);
363 virtual ~ReceiptRequestSeqOf();
364 virtual AsnType *Clone() const;
365
366 virtual AsnType *Copy() const;
367
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; }
381
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(); }
385
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
391
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
397
398 // removing the current elmt from the list
399 void RemoveCurrFromList();
400
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);
406
407 PDU_MEMBER_MACROS
408 void Print (ostream &os) const;
409 };
410
411
412 class ESSPrivacyMark: public AsnType
413 {
414 public:
415 enum ChoiceIdEnum
416 {
417 pStringCid = 0,
418 utf8StringCid = 1
419 };
420
421 enum ChoiceIdEnum choiceId;
422 union
423 {
424 PrintableString *pString;
425 UTF8String *utf8String;
426 };
427
428
429 ESSPrivacyMark();
430 ESSPrivacyMark (const ESSPrivacyMark &);
431 virtual ~ESSPrivacyMark();
432
433 virtual AsnType *Clone() const;
434
435 virtual AsnType *Copy() const;
436
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 void Print (ostream &os) const;
443 };
444
445
446 class SecurityCategory: public AsnType
447 {
448 public:
449 AsnOid type;
450 AsnAny value;
451
452 SecurityCategory();
453 SecurityCategory (const SecurityCategory &);
454 virtual ~SecurityCategory();
455 virtual AsnType *Clone() const;
456
457 virtual AsnType *Copy() const;
458
459 SecurityCategory &operator = (const SecurityCategory &);
460 AsnLen BEncContent (BUF_TYPE b);
461 void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
462
463 AsnLen BEnc (BUF_TYPE b);
464 void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
465 void Print (ostream &os) const;
466 };
467
468
469 class EntityIdentifier: public AsnType
470 {
471 public:
472 enum ChoiceIdEnum
473 {
474 issuerAndSerialNumberCid = 0,
475 subjectKeyIdentifierCid = 1
476 };
477
478 enum ChoiceIdEnum choiceId;
479 union
480 {
481 IssuerAndSerialNumber *issuerAndSerialNumber;
482 KeyIdentifier *subjectKeyIdentifier;
483 };
484
485
486 EntityIdentifier();
487 EntityIdentifier (const EntityIdentifier &);
488 virtual ~EntityIdentifier();
489
490 virtual AsnType *Clone() const;
491
492 virtual AsnType *Copy() const;
493
494 EntityIdentifier &operator = (const EntityIdentifier &);
495 AsnLen BEncContent (BUF_TYPE b);
496 void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
497 AsnLen BEnc (BUF_TYPE b);
498 void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
499 void Print (ostream &os) const;
500 };
501
502
503 class ReceiptsFrom: public AsnType
504 {
505 public:
506 enum ChoiceIdEnum
507 {
508 allOrFirstTierCid = 0,
509 receiptListCid = 1
510 };
511
512 enum ChoiceIdEnum choiceId;
513 union
514 {
515 AllOrFirstTier *allOrFirstTier;
516 ReceiptsFromSeqOf *receiptList;
517 };
518
519
520 ReceiptsFrom();
521 ReceiptsFrom (const ReceiptsFrom &);
522 virtual ~ReceiptsFrom();
523
524 virtual AsnType *Clone() const;
525
526 virtual AsnType *Copy() const;
527
528 ReceiptsFrom &operator = (const ReceiptsFrom &);
529 AsnLen BEncContent (BUF_TYPE b);
530 void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
531 AsnLen BEnc (BUF_TYPE b);
532 void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
533 void Print (ostream &os) const;
534 };
535
536
537 class SecurityCategories: public AsnType
538 {
539 protected:
540 unsigned long int count;
541 struct AsnListElmt
542 {
543 AsnListElmt *next;
544 AsnListElmt *prev;
545 SecurityCategory *elmt;
546 } *first, *curr, *last;
547
548 public:
549 SecurityCategories() { count = 0; first = curr = last = NULL; }
550 SecurityCategories (const SecurityCategories &);
551 virtual ~SecurityCategories();
552 virtual AsnType *Clone() const;
553
554 virtual AsnType *Copy() const;
555
556 SecurityCategories &operator = (const SecurityCategories &);
557 void SetCurrElmt (unsigned long int index);
558 unsigned long int GetCurrElmtIndex();
559 void SetCurrToFirst() { curr = first; }
560 void SetCurrToLast() { curr = last; }
561 // reading member fcns
562 int Count() const { return count; }
563 // NOTE: if your compiler complains about these NULLs, its definition of NULL is broken (and you better change it there!)
564 SecurityCategory *First() const { return count > 0 ? first->elmt : NULL; }
565 SecurityCategory *Last() const { return count > 0 ? last->elmt : NULL; }
566 SecurityCategory *Curr() const { return curr ? curr->elmt : NULL; }
567 SecurityCategory *Next() const { return curr && curr->next ? curr->next->elmt : NULL; }
568 SecurityCategory *Prev() const { return curr && curr->prev ? curr->prev->elmt : NULL; }
569
570 // routines that move the curr elmt
571 SecurityCategory *GoNext() { if (curr) curr = curr->next; return Curr(); }
572 SecurityCategory *GoPrev() { if (curr) curr = curr->prev; return Curr(); }
573
574 // write & alloc fcns - returns new elmt
575 SecurityCategory *Append(); // add elmt to end of list
576 SecurityCategory *Prepend(); // add elmt to beginning of list
577 SecurityCategory *InsertBefore(); //insert elmt before current elmt
578 SecurityCategory *InsertAfter(); //insert elmt after current elmt
579
580 // write & alloc & copy - returns list after copying elmt
581 SecurityCategories &AppendCopy (SecurityCategory &elmt); // add elmt to end of list
582 SecurityCategories &PrependCopy (SecurityCategory &elmt); // add elmt to beginning of list
583 SecurityCategories &InsertBeforeAndCopy (SecurityCategory &elmt); //insert elmt before current elmt
584 SecurityCategories &InsertAfterAndCopy (SecurityCategory &elmt); //insert elmt after current elmt
585
586 // removing the current elmt from the list
587 void RemoveCurrFromList();
588
589 // encode and decode routines
590 AsnLen BEnc (BUF_TYPE b);
591 void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
592 AsnLen BEncContent (BUF_TYPE b);
593 void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
594
595 PDU_MEMBER_MACROS
596 void Print (ostream &os) const;
597 };
598
599
600 class MLReceiptPolicy: public AsnType
601 {
602 public:
603 enum ChoiceIdEnum
604 {
605 noneCid = 0,
606 insteadOfCid = 1,
607 inAdditionToCid = 2
608 };
609
610 enum ChoiceIdEnum choiceId;
611 union
612 {
613 AsnNull *none;
614 MLReceiptPolicySeqOf *insteadOf;
615 MLReceiptPolicySeqOf1 *inAdditionTo;
616 };
617
618
619 MLReceiptPolicy();
620 MLReceiptPolicy (const MLReceiptPolicy &);
621 virtual ~MLReceiptPolicy();
622
623 virtual AsnType *Clone() const;
624
625 virtual AsnType *Copy() const;
626
627 MLReceiptPolicy &operator = (const MLReceiptPolicy &);
628 AsnLen BEncContent (BUF_TYPE b);
629 void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
630 AsnLen BEnc (BUF_TYPE b);
631 void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
632 void Print (ostream &os) const;
633 };
634
635
636 class ESSCertID: public AsnType
637 {
638 public:
639 CertHash certHash;
640 IssuerSerial *issuerSerial;
641
642 ESSCertID();
643 ESSCertID (const ESSCertID &);
644 virtual ~ESSCertID();
645 virtual AsnType *Clone() const;
646
647 virtual AsnType *Copy() const;
648
649 ESSCertID &operator = (const ESSCertID &);
650 AsnLen BEncContent (BUF_TYPE b);
651 void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
652
653 AsnLen BEnc (BUF_TYPE b);
654 void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
655 void Print (ostream &os) const;
656 };
657
658
659 class SigningCertificateSeqOf: public AsnType
660 {
661 protected:
662 unsigned long int count;
663 struct AsnListElmt
664 {
665 AsnListElmt *next;
666 AsnListElmt *prev;
667 ESSCertID *elmt;
668 } *first, *curr, *last;
669
670 public:
671 SigningCertificateSeqOf() { count = 0; first = curr = last = NULL; }
672 SigningCertificateSeqOf (const SigningCertificateSeqOf &);
673 virtual ~SigningCertificateSeqOf();
674 virtual AsnType *Clone() const;
675
676 virtual AsnType *Copy() const;
677
678 SigningCertificateSeqOf &operator = (const SigningCertificateSeqOf &);
679 void SetCurrElmt (unsigned long int index);
680 unsigned long int GetCurrElmtIndex();
681 void SetCurrToFirst() { curr = first; }
682 void SetCurrToLast() { curr = last; }
683 // reading member fcns
684 int Count() const { return count; }
685 // NOTE: if your compiler complains about these NULLs, its definition of NULL is broken (and you better change it there!)
686 ESSCertID *First() const { return count > 0 ? first->elmt : NULL; }
687 ESSCertID *Last() const { return count > 0 ? last->elmt : NULL; }
688 ESSCertID *Curr() const { return curr ? curr->elmt : NULL; }
689 ESSCertID *Next() const { return curr && curr->next ? curr->next->elmt : NULL; }
690 ESSCertID *Prev() const { return curr && curr->prev ? curr->prev->elmt : NULL; }
691
692 // routines that move the curr elmt
693 ESSCertID *GoNext() { if (curr) curr = curr->next; return Curr(); }
694 ESSCertID *GoPrev() { if (curr) curr = curr->prev; return Curr(); }
695
696 // write & alloc fcns - returns new elmt
697 ESSCertID *Append(); // add elmt to end of list
698 ESSCertID *Prepend(); // add elmt to beginning of list
699 ESSCertID *InsertBefore(); //insert elmt before current elmt
700 ESSCertID *InsertAfter(); //insert elmt after current elmt
701
702 // write & alloc & copy - returns list after copying elmt
703 SigningCertificateSeqOf &AppendCopy (ESSCertID &elmt); // add elmt to end of list
704 SigningCertificateSeqOf &PrependCopy (ESSCertID &elmt); // add elmt to beginning of list
705 SigningCertificateSeqOf &InsertBeforeAndCopy (ESSCertID &elmt); //insert elmt before current elmt
706 SigningCertificateSeqOf &InsertAfterAndCopy (ESSCertID &elmt); //insert elmt after current elmt
707
708 // removing the current elmt from the list
709 void RemoveCurrFromList();
710
711 // encode and decode routines
712 AsnLen BEnc (BUF_TYPE b);
713 void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
714 AsnLen BEncContent (BUF_TYPE b);
715 void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
716
717 PDU_MEMBER_MACROS
718 void Print (ostream &os) const;
719 };
720
721
722 class ESSSecurityLabel: public AsnType
723 {
724 public:
725 SecurityPolicyIdentifier security_policy_identifier;
726 SecurityClassification *security_classification;
727 ESSPrivacyMark *privacy_mark;
728 SecurityCategories *security_categories;
729
730 ESSSecurityLabel();
731 ESSSecurityLabel (const ESSSecurityLabel &);
732 virtual ~ESSSecurityLabel();
733 virtual AsnType *Clone() const;
734
735 virtual AsnType *Copy() const;
736
737 ESSSecurityLabel &operator = (const ESSSecurityLabel &);
738 AsnLen BEncContent (BUF_TYPE b);
739 void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
740
741 AsnLen BEnc (BUF_TYPE b);
742 void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
743 void Print (ostream &os) const;
744 };
745
746
747 class MLData: public AsnType
748 {
749 public:
750 EntityIdentifier *mailListIdentifier;
751 GeneralizedTime expansionTime;
752 MLReceiptPolicy *mlReceiptPolicy;
753
754 MLData();
755 MLData (const MLData &);
756 virtual ~MLData();
757 virtual AsnType *Clone() const;
758
759 virtual AsnType *Copy() const;
760
761 MLData &operator = (const MLData &);
762 AsnLen BEncContent (BUF_TYPE b);
763 void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
764
765 AsnLen BEnc (BUF_TYPE b);
766 void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
767 void Print (ostream &os) const;
768 };
769
770
771 class ReceiptRequest: public AsnType
772 {
773 public:
774 ContentIdentifier signedContentIdentifier;
775 ReceiptsFrom *receiptsFrom;
776 ReceiptRequestSeqOf receiptsTo;
777
778 ReceiptRequest();
779 ReceiptRequest (const ReceiptRequest &);
780 virtual ~ReceiptRequest();
781 virtual AsnType *Clone() const;
782
783 virtual AsnType *Copy() const;
784
785 ReceiptRequest &operator = (const ReceiptRequest &);
786 AsnLen BEncContent (BUF_TYPE b);
787 void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
788
789 AsnLen BEnc (BUF_TYPE b);
790 void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
791 void Print (ostream &os) const;
792 };
793
794
795 class Receipt: public AsnType
796 {
797 public:
798 CMSVersion version;
799 ContentType contentType;
800 ContentIdentifier signedContentIdentifier;
801 AsnOcts originatorSignatureValue;
802
803 Receipt();
804 Receipt (const Receipt &);
805 virtual ~Receipt();
806 virtual AsnType *Clone() const;
807
808 virtual AsnType *Copy() const;
809
810 Receipt &operator = (const Receipt &);
811 AsnLen BEncContent (BUF_TYPE b);
812 void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
813
814 AsnLen BEnc (BUF_TYPE b);
815 void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
816 void Print (ostream &os) const;
817 };
818
819
820 class ContentHints: public AsnType
821 {
822 public:
823 UTF8String *contentDescription;
824 ContentType contentType;
825
826 ContentHints();
827 ContentHints (const ContentHints &);
828 virtual ~ContentHints();
829 virtual AsnType *Clone() const;
830
831 virtual AsnType *Copy() const;
832
833 ContentHints &operator = (const ContentHints &);
834 AsnLen BEncContent (BUF_TYPE b);
835 void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
836
837 AsnLen BEnc (BUF_TYPE b);
838 void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
839 void Print (ostream &os) const;
840 };
841
842
843 class ContentReference: public AsnType
844 {
845 public:
846 ContentType contentType;
847 ContentIdentifier signedContentIdentifier;
848 AsnOcts originatorSignatureValue;
849
850 ContentReference();
851 ContentReference (const ContentReference &);
852 virtual ~ContentReference();
853 virtual AsnType *Clone() const;
854
855 virtual AsnType *Copy() const;
856
857 ContentReference &operator = (const ContentReference &);
858 AsnLen BEncContent (BUF_TYPE b);
859 void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
860
861 AsnLen BEnc (BUF_TYPE b);
862 void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
863 void Print (ostream &os) const;
864 };
865
866
867 class EquivalentLabels: public AsnType
868 {
869 protected:
870 unsigned long int count;
871 struct AsnListElmt
872 {
873 AsnListElmt *next;
874 AsnListElmt *prev;
875 ESSSecurityLabel *elmt;
876 } *first, *curr, *last;
877
878 public:
879 EquivalentLabels() { count = 0; first = curr = last = NULL; }
880 EquivalentLabels (const EquivalentLabels &);
881 virtual ~EquivalentLabels();
882 virtual AsnType *Clone() const;
883
884 virtual AsnType *Copy() const;
885
886 EquivalentLabels &operator = (const EquivalentLabels &);
887 void SetCurrElmt (unsigned long int index);
888 unsigned long int GetCurrElmtIndex();
889 void SetCurrToFirst() { curr = first; }
890 void SetCurrToLast() { curr = last; }
891 // reading member fcns
892 int Count() const { return count; }
893 // NOTE: if your compiler complains about these NULLs, its definition of NULL is broken (and you better change it there!)
894 ESSSecurityLabel *First() const { return count > 0 ? first->elmt : NULL; }
895 ESSSecurityLabel *Last() const { return count > 0 ? last->elmt : NULL; }
896 ESSSecurityLabel *Curr() const { return curr ? curr->elmt : NULL; }
897 ESSSecurityLabel *Next() const { return curr && curr->next ? curr->next->elmt : NULL; }
898 ESSSecurityLabel *Prev() const { return curr && curr->prev ? curr->prev->elmt : NULL; }
899
900 // routines that move the curr elmt
901 ESSSecurityLabel *GoNext() { if (curr) curr = curr->next; return Curr(); }
902 ESSSecurityLabel *GoPrev() { if (curr) curr = curr->prev; return Curr(); }
903
904 // write & alloc fcns - returns new elmt
905 ESSSecurityLabel *Append(); // add elmt to end of list
906 ESSSecurityLabel *Prepend(); // add elmt to beginning of list
907 ESSSecurityLabel *InsertBefore(); //insert elmt before current elmt
908 ESSSecurityLabel *InsertAfter(); //insert elmt after current elmt
909
910 // write & alloc & copy - returns list after copying elmt
911 EquivalentLabels &AppendCopy (ESSSecurityLabel &elmt); // add elmt to end of list
912 EquivalentLabels &PrependCopy (ESSSecurityLabel &elmt); // add elmt to beginning of list
913 EquivalentLabels &InsertBeforeAndCopy (ESSSecurityLabel &elmt); //insert elmt before current elmt
914 EquivalentLabels &InsertAfterAndCopy (ESSSecurityLabel &elmt); //insert elmt after current elmt
915
916 // removing the current elmt from the list
917 void RemoveCurrFromList();
918
919 // encode and decode routines
920 AsnLen BEnc (BUF_TYPE b);
921 void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
922 AsnLen BEncContent (BUF_TYPE b);
923 void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
924
925 PDU_MEMBER_MACROS
926 void Print (ostream &os) const;
927 };
928
929
930 class MLExpansionHistory: public AsnType
931 {
932 protected:
933 unsigned long int count;
934 struct AsnListElmt
935 {
936 AsnListElmt *next;
937 AsnListElmt *prev;
938 MLData *elmt;
939 } *first, *curr, *last;
940
941 public:
942 MLExpansionHistory() { count = 0; first = curr = last = NULL; }
943 MLExpansionHistory (const MLExpansionHistory &);
944 virtual ~MLExpansionHistory();
945 virtual AsnType *Clone() const;
946
947 virtual AsnType *Copy() const;
948
949 MLExpansionHistory &operator = (const MLExpansionHistory &);
950 void SetCurrElmt (unsigned long int index);
951 unsigned long int GetCurrElmtIndex();
952 void SetCurrToFirst() { curr = first; }
953 void SetCurrToLast() { curr = last; }
954 // reading member fcns
955 int Count() const { return count; }
956 // NOTE: if your compiler complains about these NULLs, its definition of NULL is broken (and you better change it there!)
957 MLData *First() const { return count > 0 ? first->elmt : NULL; }
958 MLData *Last() const { return count > 0 ? last->elmt : NULL; }
959 MLData *Curr() const { return curr ? curr->elmt : NULL; }
960 MLData *Next() const { return curr && curr->next ? curr->next->elmt : NULL; }
961 MLData *Prev() const { return curr && curr->prev ? curr->prev->elmt : NULL; }
962
963 // routines that move the curr elmt
964 MLData *GoNext() { if (curr) curr = curr->next; return Curr(); }
965 MLData *GoPrev() { if (curr) curr = curr->prev; return Curr(); }
966
967 // write & alloc fcns - returns new elmt
968 MLData *Append(); // add elmt to end of list
969 MLData *Prepend(); // add elmt to beginning of list
970 MLData *InsertBefore(); //insert elmt before current elmt
971 MLData *InsertAfter(); //insert elmt after current elmt
972
973 // write & alloc & copy - returns list after copying elmt
974 MLExpansionHistory &AppendCopy (MLData &elmt); // add elmt to end of list
975 MLExpansionHistory &PrependCopy (MLData &elmt); // add elmt to beginning of list
976 MLExpansionHistory &InsertBeforeAndCopy (MLData &elmt); //insert elmt before current elmt
977 MLExpansionHistory &InsertAfterAndCopy (MLData &elmt); //insert elmt after current elmt
978
979 // removing the current elmt from the list
980 void RemoveCurrFromList();
981
982 // encode and decode routines
983 AsnLen BEnc (BUF_TYPE b);
984 void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
985 AsnLen BEncContent (BUF_TYPE b);
986 void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
987
988 PDU_MEMBER_MACROS
989 void Print (ostream &os) const;
990 };
991
992
993 class SigningCertificate: public AsnType
994 {
995 public:
996 SigningCertificateSeqOf certs;
997 SigningCertificateSeqOf1 *policies;
998
999 SigningCertificate();
1000 SigningCertificate (const SigningCertificate &);
1001 virtual ~SigningCertificate();
1002 virtual AsnType *Clone() const;
1003
1004 virtual AsnType *Copy() const;
1005
1006 SigningCertificate &operator = (const SigningCertificate &);
1007 AsnLen BEncContent (BUF_TYPE b);
1008 void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
1009
1010 AsnLen BEnc (BUF_TYPE b);
1011 void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
1012 void Print (ostream &os) const;
1013 };
1014
1015
1016 //------------------------------------------------------------------------------
1017 // externs for value defs
1018
1019 #define ub_receiptsTo_val 16
1020 #define ub_receiptsTo AsnInt(ub_receiptsTo_val)
1021 #define smime_arc 1, 2, 840, 113549, 1, 9, 16
1022 #define smime AsnOid(smime_arc)
1023 #define id_aa_arc 1, 2, 840, 113549, 1, 9, 16, 2
1024 #define id_aa AsnOid(id_aa_arc)
1025 #define id_aa_receiptRequest_arc 1, 2, 840, 113549, 1, 9, 16, 2, 1
1026 #define id_aa_receiptRequest AsnOid(id_aa_receiptRequest_arc)
1027 #define id_aa_contentIdentifier_arc 1, 2, 840, 113549, 1, 9, 16, 2, 7
1028 #define id_aa_contentIdentifier AsnOid(id_aa_contentIdentifier_arc)
1029 #define id_ct_receipt_arc 1, 2, 840, 113549, 1, 9, 16, 1, 1
1030 #define id_ct_receipt AsnOid(id_ct_receipt_arc)
1031 #define id_aa_contentHint_arc 1, 2, 840, 113549, 1, 9, 16, 2, 4
1032 #define id_aa_contentHint AsnOid(id_aa_contentHint_arc)
1033 #define id_aa_msgSigDigest_arc 1, 2, 840, 113549, 1, 9, 16, 2, 5
1034 #define id_aa_msgSigDigest AsnOid(id_aa_msgSigDigest_arc)
1035 #define id_aa_contentReference_arc 1, 2, 840, 113549, 1, 9, 16, 2, 10
1036 #define id_aa_contentReference AsnOid(id_aa_contentReference_arc)
1037 #define id_aa_securityLabel_arc 1, 2, 840, 113549, 1, 9, 16, 2, 2
1038 #define id_aa_securityLabel AsnOid(id_aa_securityLabel_arc)
1039 #define id_aa_equivalentLabels_arc 1, 2, 840, 113549, 1, 9, 16, 2, 9
1040 #define id_aa_equivalentLabels AsnOid(id_aa_equivalentLabels_arc)
1041 #define id_aa_mlExpandHistory_arc 1, 2, 840, 113549, 1, 9, 16, 2, 3
1042 #define id_aa_mlExpandHistory AsnOid(id_aa_mlExpandHistory_arc)
1043 #define ub_ml_expansion_history_val 64
1044 #define ub_ml_expansion_history AsnInt(ub_ml_expansion_history_val)
1045 #define id_aa_signingCertificate_arc 1, 2, 840, 113549, 1, 9, 16, 2, 4444
1046 #define id_aa_signingCertificate AsnOid(id_aa_signingCertificate_arc)
1047 #define id_pkix_arc 1, 3, 6, 1, 5, 5, 7
1048 #define id_pkix AsnOid(id_pkix_arc)
1049 #define id_qt_arc 1, 3, 6, 1, 5, 5, 7, 2
1050 #define id_qt AsnOid(id_qt_arc)
1051 #define id_qt_cps_arc 1, 3, 6, 1, 5, 5, 7, 2, 1
1052 #define id_qt_cps AsnOid(id_qt_cps_arc)
1053 #define id_qt_unotice_arc 1, 3, 6, 1, 5, 5, 7, 2, 2
1054 #define id_qt_unotice AsnOid(id_qt_unotice_arc)
1055 //------------------------------------------------------------------------------
1056
1057 #endif /* conditional include of sm_ess.h */