aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/x420/x420.asn
blob: 1422e9cadd56d6d4493678946bbf7323885a7d78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
-- Module IPMSInformationObjects (X.420:06/1999)
IPMSInformationObjects {joint-iso-itu-t mhs(6) ipms(1) modules(0)
  information-objects(2) version-1999(1)} DEFINITIONS IMPLICIT TAGS ::=
BEGIN

-- Prologue
-- Exports everything.
IMPORTS
  -- IPMS Extended Body Parts
--  bilaterally-defined-body-part, encrypted-body-part, g3-facsimile-body-part,
--    g4-class1-body-part, ia5-text-body-part, message-body-part,
--    mixed-mode-body-part, nationally-defined-body-part, teletex-body-part,
--    videotex-body-part
    --==
--    FROM IPMSExtendedBodyPartTypes {joint-iso-itu-t mhs(6) ipms(1) modules(0)
--      extended-body-part-types(7) version-1994(0)}
--  general-text-body-part
    --==
--    FROM IPMSExtendedBodyPartTypes2 {iso standard mhs(10021) ipms(7) 
--      modules(0) extended-body-part-types-2(1)}
--  file-transfer-body-part
    --==
--    FROM IPMSFileTransferBodyPartType {joint-iso-itu-t mhs(6) ipms(1)
--      modules(0) file-transfer-body-part-type(9)}
--  voice-body-part
    --==
--    FROM IPMSExtendedVoiceBodyPartType {joint-iso-itu-t mhs(6) ipms(1)
--      modules(0) extended-voice-body-part-type(11)}
--  notification-body-part, report-body-part
    --==
--    FROM IPMSForwardedReportBodyPartType {joint-iso-itu-t mhs(6) ipms(1)
--      modules(0) forwarded-report-body-part-type(12)}
--  content-body-part{}
    --==
--    FROM IPMSForwardedContentBodyPartType {joint-iso-itu-t mhs(6) ipms(1)
--      modules(0) forwarded-content-body-part-type(15)}
--  pkcs7-body-part
    --==
--    FROM PKCS7BodyPartType {joint-iso-itu-t mhs(6) ipms(1) modules(0)
--      pkcs7-body-part-type(16)}
  -- IPMS Heading Extensions
--  authorization-time, auto-submitted, body-part-signatures,
--    circulation-list-indicator, circulation-list-recipients,
--    distribution-codes, extended-subject, incomplete-copy,
--    information-category, ipm-security-label, languages,
--    manual-handling-instructions, originators-reference, precedence,
--    precedence-policy-identifier
    --==
--    FROM IPMSHeadingExtensions {joint-iso-itu-t mhs(6) ipms(1) modules(0)
--      heading-extensions(6) version-1999(1)}
  -- IPMS Security Extensions
--  body-part-encryption-token, BodyPartTokens, forwarded-content-token,
--    ForwardedContentToken, ipn-security-response, recipient-security-request
    --==
--    FROM IPMSSecurityExtensions {joint-iso-itu-t mhs(6) ipms(1) modules(0)
--      ipm-security-extensions(14) version-1999(1)}
  -- IPMS Upper bounds
--  ub-auto-forward-comment, ub-free-form-name, ub-local-ipm-identifier,
--    ub-subject-field, ub-telephone-number
    --==
--    FROM IPMSUpperBounds {joint-iso-itu-t mhs(6) ipms(1) modules(0)
--      upper-bounds(10) version-1999(1)}
  -- ODIF
--  Interchange-Data-Element
    --==
--    FROM Interchange-Data-Elements {2 8 1 5 5}
  -- MTS Abstract Service
  EncodedInformationTypes, ExtendedCertificates, EXTENSION,
    G3FacsimileNonBasicParameters, MessageDeliveryTime, ORName,
    OtherMessageDeliveryFields, SupplementaryInformation,
    TeletexNonBasicParameters, UniversalOrBMPString, SecurityLabel,
    MessageDeliveryIdentifier, ProofOfSubmission, OriginatingMTACertificate,
    MessageSubmissionEnvelope
    --==
    FROM MTSAbstractService {joint-iso-itu-t mhs(6) mts(3) modules(0)
      mts-abstract-service(1) version-1999(1)}
  -- MS Abstract Service
--  MS-EXTENSION, SequenceNumber
    --==
--    FROM MSAbstractService {joint-iso-itu-t mhs(6) ms(4) modules(0)
--      abstract-service(1) version-1999(1)}
  -- Directory Authentication Framework
  AlgorithmIdentifier, ENCRYPTED{}
    --==
    FROM AuthenticationFramework {joint-iso-itu-t ds(5) module(1)
      authenticationFramework(7) 3}
  -- IPMS Object Identifiers
--  id-mst-assembly-capability, id-mst-assembly-instructions,
--    id-mst-invalid-assembly-instructions, id-mst-invalid-ipn,
--    id-mst-originator-body-part-encryption-token,
--    id-mst-originator-forwarded-content-token,
--    id-mst-suspend-auto-acknowledgement, id-mst-prevent-nrn-generation,
--    id-on-absence-advice, id-on-change-of-address-advice
    --==
--    FROM IPMSObjectIdentifiers {joint-iso-itu-t mhs(6) ipms(1) modules(0)
--      object-identifiers(0) version-1999(1)} ; --
    EXTERNAL 
    FROM ACSE-1
  CertificateAssertion
    --==
    FROM CertificateExtensions {joint-iso-itu-t ds(5) module(1)
      certificateExtensions(26) 0};


Time ::= UTCTime

-- Information object
InformationObject ::= CHOICE {ipm  [0]  IPM,
                              ipn  [1]  IPN
}

-- IPM
IPM ::= SEQUENCE {heading  Heading,
                  body     Body
}

-- MTS Extensions
--IPMPerRecipientEnvelopeExtensions EXTENSION ::=
--  {blind-copy-recipients | body-part-encryption-token |
--   forwarded-content-token, ...}

-- IPMS Extensions
IPMSExtension --{IPMS-EXTENSION:ChosenFrom}-- ::= SEQUENCE {
  type   OBJECT IDENTIFIER, --IPMS-EXTENSION.&id({ChosenFrom}),
  value  ANY --IPMS-EXTENSION.&Type({ChosenFrom}{@type}) DEFAULT NULL:NULL
}

--IPMS-EXTENSION ::= CLASS {&id    OBJECT IDENTIFIER UNIQUE,
--                          &Type  DEFAULT NULL
--}WITH SYNTAX {[VALUE &Type,]
--              IDENTIFIED BY &id
--}

--PrivateIPMSExtensions IPMS-EXTENSION ::=
--  {...}

-- Heading
Heading ::= SET {
  this-IPM               ThisIPMField,
  originator             [0]  OriginatorField OPTIONAL,
  authorizing-users      [1]  AuthorizingUsersField OPTIONAL,
  primary-recipients     [2]  PrimaryRecipientsField DEFAULT {},
  copy-recipients        [3]  CopyRecipientsField DEFAULT {},
  blind-copy-recipients  [4]  BlindCopyRecipientsField OPTIONAL,
  replied-to-IPM         [5]  RepliedToIPMField OPTIONAL,
  obsoleted-IPMs         [6]  ObsoletedIPMsField DEFAULT {},
  related-IPMs           [7]  RelatedIPMsField DEFAULT {},
  subject                [8] EXPLICIT SubjectField OPTIONAL,
  expiry-time            [9]  ExpiryTimeField OPTIONAL,
  reply-time             [10]  ReplyTimeField OPTIONAL,
  reply-recipients       [11]  ReplyRecipientsField OPTIONAL,
  importance             [12]  ImportanceField DEFAULT normal,
  sensitivity            [13]  SensitivityField OPTIONAL,
  auto-forwarded         [14]  AutoForwardedField DEFAULT FALSE,
  extensions             [15]  ExtensionsField DEFAULT {}
}

-- Heading component types
IPMIdentifier ::= [APPLICATION 11]  SET {
  user                      ORName OPTIONAL,
  user-relative-identifier  LocalIPMIdentifier
}

LocalIPMIdentifier ::= PrintableString(SIZE (0..ub-local-ipm-identifier))

RecipientSpecifier ::= SET {
  recipient              [0]  ORDescriptor,
  notification-requests  [1]  NotificationRequests DEFAULT {},
  reply-requested        [2]  BOOLEAN DEFAULT FALSE,
  recipient-extensions   [3]  RecipientExtensionsField OPTIONAL
}

ORDescriptor ::= SET {
  formal-name       ORName OPTIONAL,
  free-form-name    [0]  FreeFormName OPTIONAL,
  telephone-number  [1]  TelephoneNumber OPTIONAL
}

FreeFormName ::= TeletexString(SIZE (0..ub-free-form-name))

TelephoneNumber ::= PrintableString(SIZE (0..ub-telephone-number))

NotificationRequests ::= BIT STRING {
  rn(0), nrn(1), ipm-return(2), an-supported(3), suppress-an(4)}

RecipientExtensionsField ::= SET OF IPMSExtension --{{RecipientExtensions}}

--RecipientExtensions IPMS-EXTENSION ::=
--  {circulation-list-indicator | precedence | recipient-security-request |
--   PrivateIPMSExtensions, ...}

-- This IPM heading field
ThisIPMField ::= IPMIdentifier

-- Originator heading field
OriginatorField ::= ORDescriptor

-- Authorizing Users heading field
AuthorizingUsersField ::= SEQUENCE OF AuthorizingUsersSubfield

AuthorizingUsersSubfield ::= ORDescriptor

-- Primary Recipients heading field
PrimaryRecipientsField ::= SEQUENCE OF PrimaryRecipientsSubfield

PrimaryRecipientsSubfield ::= RecipientSpecifier

-- Copy Recipients heading field
CopyRecipientsField ::= SEQUENCE OF CopyRecipientsSubfield

CopyRecipientsSubfield ::= RecipientSpecifier

-- Blind Copy Recipients heading field
BlindCopyRecipientsField ::= SEQUENCE OF BlindCopyRecipientsSubfield

BlindCopyRecipientsSubfield ::= RecipientSpecifier

-- Blind Copy Recipients envelope field
--blind-copy-recipients EXTENSION ::= {
--  BlindCopyRecipientsField,
--  IDENTIFIED BY  standard-extension:41
--}

-- Replied-to IPM heading field
RepliedToIPMField ::= IPMIdentifier

-- Obsoleted IPMs heading field
ObsoletedIPMsField ::= SEQUENCE OF ObsoletedIPMsSubfield

ObsoletedIPMsSubfield ::= IPMIdentifier

-- Related IPMs heading field
RelatedIPMsField ::= SEQUENCE OF RelatedIPMsSubfield

RelatedIPMsSubfield ::= IPMIdentifier

-- Subject heading field
SubjectField ::= TeletexString(SIZE (0..ub-subject-field))

-- Expiry Time heading field
ExpiryTimeField ::= Time

-- Reply Time heading field
ReplyTimeField ::= Time

-- Reply Recipients heading field
ReplyRecipientsField ::= SEQUENCE OF ReplyRecipientsSubfield

ReplyRecipientsSubfield ::=
  ORDescriptor --(WITH COMPONENTS {
--                 ...,
--                 formal-name  PRESENT
--               })

-- Importance heading field
ImportanceField ::= ENUMERATED {low(0), normal(1), high(2)}

-- Sensitivity heading field
SensitivityField ::= ENUMERATED {
  personal(1), private(2), company-confidential(3)}

-- Auto-forwarded heading field
AutoForwardedField ::= BOOLEAN

-- Extensions heading field
ExtensionsField ::= SET OF IPMSExtension --{{HeadingExtensions}}

--HeadingExtensions IPMS-EXTENSION ::=
--  {authorization-time | auto-submitted | body-part-signatures |
--   circulation-list-recipients | distribution-codes | extended-subject |
--   incomplete-copy | information-category | ipm-security-label | languages |
--   manual-handling-instructions | originators-reference |
--   precedence-policy-identifier | PrivateIPMSExtensions, ...}

-- Body
Body ::= SEQUENCE OF BodyPart

-- asn2wrs seems to have problems with this CHOICE CHOICE
BodyPart ::= CHOICE {
--  basic
--    CHOICE { -- ia5-text             [0]  IA5TextBodyPart,
            g3-facsimile         [3]  G3FacsimileBodyPart,
            g4-class1            [4]  G4Class1BodyPart,
            teletex              [5]  TeletexBodyPart,
            videotex             [6]  VideotexBodyPart,
            encrypted            [8]  EncryptedBodyPart,
            message              [9]  MessageBodyPart,
            mixed-mode           [11]  MixedModeBodyPart,
            bilaterally-defined  [14]  BilaterallyDefinedBodyPart,
            nationally-defined   [7]  NationallyDefinedBodyPart --} --,
	    extended  [15]  ExtendedBodyPart --{{IPMBodyPartTable}}
}


-- Extended body part
ExtendedBodyPart --{EXTENDED-BODY-PART-TYPE:IPMBodyPartTable}-- ::= SEQUENCE {
  parameters  [0]  EXTERNAL, --INSTANCE OF TYPE-IDENTIFIER OPTIONAL,
  data        EXTERNAL -- INSTANCE OF TYPE-IDENTIFIER
}
--(CONSTRAINED BY { - - must correspond to the &parameters field and &data field of a member of --
--   IPMBodyPartTable})

--IPMBodyPartTable EXTENDED-BODY-PART-TYPE ::=
--  {StandardBodyParts | ApplicationSpecificBodyParts}

--StandardBodyParts EXTENDED-BODY-PART-TYPE ::=
--  {ia5-text-body-part | g3-facsimile-body-part | g4-class1-body-part |
--   teletex-body-part | videotex-body-part | encrypted-body-part |
--   message-body-part | mixed-mode-body-part | bilaterally-defined-body-part |
--   nationally-defined-body-part | general-text-body-part |
--   file-transfer-body-part | voice-body-part | report-body-part |
--   notification-body-part |
--   content-body-part{{1 2 3 - - RELATIVE-OID to be provided - -}} |
--   pkcs7-body-part, ...}

--ApplicationSpecificBodyParts EXTENDED-BODY-PART-TYPE ::=
--  {- -any body part defined in other Specifications, or for proprietary or private use 
--   ...}

--EXTENDED-BODY-PART-TYPE ::= CLASS {
--  &parameters  TYPE-IDENTIFIER OPTIONAL,
--  &data        TYPE-IDENTIFIER
--}WITH SYNTAX {[PARAMETERS &parameters,]
--              DATA &data
--}

-- IA5 Text body part
IA5TextBodyPart ::= SEQUENCE {
  parameters  IA5TextParameters,
  data        IA5TextData
}

IA5TextParameters ::= SET {repertoire  [0]  Repertoire DEFAULT ia5
}

IA5TextData ::= IA5String

Repertoire ::= ENUMERATED {ita2(2), ia5(5)}

-- G3 Facsimile body part
G3FacsimileBodyPart ::= SEQUENCE {
  parameters  G3FacsimileParameters,
  data        G3FacsimileData
}

G3FacsimileParameters ::= SET {
  number-of-pages       [0]  INTEGER OPTIONAL,
  non-basic-parameters  [1]  G3FacsimileNonBasicParameters OPTIONAL
}

G3FacsimileData ::= SEQUENCE OF BIT STRING

-- G4 Class 1 and Mixed-mode body parts
G4Class1BodyPart ::= G4Class1Data

G4Class1Data ::= SEQUENCE OF Interchange-Data-Element

MixedModeBodyPart ::= MixedModeData

MixedModeData ::= SEQUENCE OF Interchange-Data-Element

-- Teletex body part
TeletexBodyPart ::= SEQUENCE {
  parameters  TeletexParameters,
  data        TeletexData
}

TeletexParameters ::= SET {
  number-of-pages       [0]  INTEGER OPTIONAL,
  telex-compatible      [1]  BOOLEAN DEFAULT FALSE,
  non-basic-parameters  [2]  TeletexNonBasicParameters OPTIONAL
}

TeletexData ::= SEQUENCE OF TeletexString

-- Videotex body part
VideotexBodyPart ::= SEQUENCE {
  parameters  VideotexParameters,
  data        VideotexData
}

VideotexParameters ::= SET {syntax  [0]  VideotexSyntax OPTIONAL
}

VideotexSyntax ::= INTEGER {
  ids(0), data-syntax1(1), data-syntax2(2), data-syntax3(3)}

VideotexData ::= VideotexString

-- Encrypted body part
EncryptedBodyPart ::= SEQUENCE {
  parameters  EncryptedParameters,
  data        EncryptedData
}

EncryptedParameters ::= SET {
  algorithm-identifier     AlgorithmIdentifier,
  originator-certificates  ExtendedCertificates OPTIONAL,
  ...
}

EncryptedData ::= BIT STRING --(CONSTRAINED BY {BodyPart})

-- Message body part
MessageBodyPart ::= SEQUENCE {
  parameters  MessageParameters,
  data        MessageData
}

MessageParameters ::= SET {
  delivery-time      [0]  MessageDeliveryTime OPTIONAL,
  delivery-envelope  [1]  OtherMessageDeliveryFields OPTIONAL
}

MessageData ::= IPM

-- Bilaterally Defined body part
BilaterallyDefinedBodyPart ::= OCTET STRING

-- Nationally Defined body part
--NATIONAL-BODY-PARTS ::= CLASS {&Type  
--}

--NationallyDefinedBodyPart ::= NATIONAL-BODY-PARTS.&Type

-- Provided for Historic reasons. Use is strongly deprecated.
-- IPN
IPN ::= SET {
  -- common-fields - -COMPONENTS OF CommonFields,
  subject-ipm              SubjectIPMField,
  ipn-originator           [1]  IPNOriginatorField OPTIONAL,
  ipm-intended-recipient   [2]  IPMIntendedRecipientField OPTIONAL,
  conversion-eits          ConversionEITsField OPTIONAL,
  notification-extensions  [3]  NotificationExtensionsField OPTIONAL,
  choice
    [0]  CHOICE {non-receipt-fields              [0]  NonReceiptFields,
                 receipt-fields                  [1]  ReceiptFields,
                 other-notification-type-fields
                   [2]  OtherNotificationTypeFields}
}

--RN ::=
--  IPN
--    (WITH COMPONENTS {
--       ...,
--       choice  (WITH COMPONENTS {
--                  receipt-fields  PRESENT
--                })
--     })

--NRN ::=
--  IPN
--    (WITH COMPONENTS {
--       ...,
--       choice  (WITH COMPONENTS {
--                  non-receipt-fields  PRESENT
--                })
--     })

--ON ::=
--  IPN
--    (WITH COMPONENTS {
--       ...,
--       choice  (WITH COMPONENTS {
--                  other-notification-type-fields  PRESENT
--                })
--     })

-- CommonFields are always used with WITH COMPONENTS - which are manually expanded
--CommonFields ::= SET {
--  subject-ipm              SubjectIPMField,
--  ipn-originator           [1]  IPNOriginatorField OPTIONAL,
--  ipm-intended-recipient   [2]  IPMIntendedRecipientField OPTIONAL,
--  conversion-eits          ConversionEITsField OPTIONAL,
--  notification-extensions  [3]  NotificationExtensionsField OPTIONAL
--}

NonReceiptFields ::= SET {
  non-receipt-reason    [0]  NonReceiptReasonField,
  discard-reason        [1]  DiscardReasonField OPTIONAL,
  auto-forward-comment  [2]  AutoForwardCommentField OPTIONAL,
  returned-ipm          [3]  ReturnedIPMField OPTIONAL,
  nrn-extensions        [4]  NRNExtensionsField OPTIONAL
}

ReceiptFields ::= SET {
  receipt-time         [0]  ReceiptTimeField,
  acknowledgment-mode  [1]  AcknowledgmentModeField DEFAULT manual,
  suppl-receipt-info   [2]  SupplReceiptInfoField OPTIONAL,
  rn-extensions        [3]  RNExtensionsField OPTIONAL
}

-- Common fields
SubjectIPMField ::= IPMIdentifier

IPNOriginatorField ::= ORDescriptor

IPMIntendedRecipientField ::= ORDescriptor

ConversionEITsField ::= EncodedInformationTypes

NotificationExtensionsField ::= SET OF IPMSExtension --{{NotificationExtensions}}

--NotificationExtensions IPMS-EXTENSION ::=
--  {ipn-security-response | PrivateIPMSExtensions, ...}

-- Non-receipt fields
NonReceiptReasonField ::= ENUMERATED {
  ipm-discarded(0), ipm-auto-forwarded(1), ...
  }

-- ITU-T version: 
DiscardReasonField ::= ENUMERATED {
  ipm-expired(0), ipm-obsoleted(1), user-subscription-terminated(2),
  not-used(3)}

-- ISO/IEC version: 
--DiscardReasonField ::= ENUMERATED {
--	ipm-expired                  (0),
--	ipm-obsoleted                (1),
--	user-subscription-terminated (2),
-- The following value may not be supported by implementations of earlier versions of this Specification
--	ipm-deleted                  (3),
--	... }
AutoForwardCommentField ::=
  AutoForwardComment

AutoForwardComment ::= PrintableString(SIZE (0..ub-auto-forward-comment))

ReturnedIPMField ::= IPM

NRNExtensionsField ::= SET OF IPMSExtension --{{NRNExtensions}}

--NRNExtensions IPMS-EXTENSION ::= {PrivateIPMSExtensions, ...}

-- Receipt fields
ReceiptTimeField ::= Time

AcknowledgmentModeField ::= ENUMERATED {manual(0), automatic(1)}

SupplReceiptInfoField ::= SupplementaryInformation

RNExtensionsField ::= SET OF IPMSExtension --{{RNExtensions}}

--RNExtensions IPMS-EXTENSION ::= {PrivateIPMSExtensions, ...}

-- Other Notification Type fields
OtherNotificationTypeFields ::= SET OF IPMSExtension --{{OtherNotifications}}

--OtherNotifications IPMS-EXTENSION ::=
--  {AdviceNotifications | PrivateIPMSExtensions, ...}

--AdviceNotifications IPMS-EXTENSION ::=
--  {absence-advice | change-of-address-advice, ...}

-- Advice Notification fields
--absence-advice IPMS-EXTENSION ::= {
--  VALUE          AbsenceAdvice,
--  IDENTIFIED BY  id-on-absence-advice
--}

AbsenceAdvice ::= SEQUENCE {
  advice          BodyPart OPTIONAL,
  next-available  Time OPTIONAL
}

-- at least one component shall be present 
--change-of-address-advice IPMS-EXTENSION ::= {
--  VALUE          ChangeOfAddressAdvice,
--  IDENTIFIED BY  id-on-change-of-address-advice
--}

ChangeOfAddressAdvice ::= SEQUENCE {
  new-address
    [0]  ORDescriptor --(WITH COMPONENTS {
--                        ...,
--                        formal-name  PRESENT
--                      }) --,
  effective-from  [1]  Time OPTIONAL
}

-- Message Store Realization
--prevent-nrn-generation MS-EXTENSION ::= {
--  NULL
--  IDENTIFIED BY  id-mst-prevent-nrn-generation
--}

--suspend-auto-acknowledgement MS-EXTENSION ::= {
--  NULL
--  IDENTIFIED BY  id-mst-suspend-auto-acknowledgement
--}

--assembly-capability MS-EXTENSION ::= {
--  NULL
--  IDENTIFIED BY  id-mst-assembly-capability
--}

--IPMSubmissionOptions MS-EXTENSION ::=
--  {ipm-assembly-instructions | originator-body-part-encryption-token |
--   originator-forwarded-content-token, ...} - - For future extension additions 

--ipm-assembly-instructions MS-EXTENSION ::= {
--  IPMAssemblyInstructions
--  IDENTIFIED BY  id-mst-assembly-instructions
--}

IPMAssemblyInstructions ::= SET {assembly-instructions  [0]  BodyPartReferences
}

BodyPartReferences ::= SEQUENCE OF BodyPartReference

BodyPartReference ::= CHOICE {
  stored-entry         [0]  SequenceNumber,
  stored-content       [1]  SequenceNumber,
  submitted-body-part  [2]  INTEGER--(1..MAX)--,
  stored-body-part
    [3]  SEQUENCE {message-entry     SequenceNumber,
                   body-part-number  --INTEGER(1..MAX)-- BodyPartNumber}
}

--originator-body-part-encryption-token MS-EXTENSION ::= {
--  BodyPartTokens
--  IDENTIFIED BY  id-mst-originator-body-part-encryption-token
--}

--originator-forwarded-content-token MS-EXTENSION ::= {
--  ForwardedContentToken
--  IDENTIFIED BY  id-mst-originator-forwarded-content-token
--}

--IPMSubmissionErrors MS-EXTENSION ::=
--  {invalid-assembly-instructions | invalid-ipn, ...
--  } - - For future extension additions 

--invalid-assembly-instructions MS-EXTENSION ::= {
--  BodyPartReferences
--  IDENTIFIED BY  id-mst-invalid-assembly-instructions
--}

--invalid-ipn MS-EXTENSION ::= {NULL
--                              IDENTIFIED BY  id-mst-invalid-ipn
--}

SequenceNumber ::= INTEGER
Interchange-Data-Element ::= ANY
NationallyDefinedBodyPart ::= ANY

-- cannot refer to basic types in .cnf .#REGISTER - so we create an intermediate type
OriginatingUA ::= IA5String

-- END - - of IPMSInformationObjects


-- Module IPMSHeadingExtensions (X.420:06/1999)
--IPMSHeadingExtensions {joint-iso-itu-t mhs(6) ipms(1) modules(0)
--  heading-extensions(6) version-1999(1)} DEFINITIONS IMPLICIT TAGS ::=
--BEGIN

-- Prologue
-- Exports everything.
--IMPORTS
  -- IPMS Information Objects
--  IPMS-EXTENSION, ORDescriptor, RecipientSpecifier, ThisIPMField, BodyPart
    --==
--    FROM IPMSInformationObjects {joint-iso-itu-t mhs(6) ipms(1) modules(0)
--      information-objects(2) version-1999(1)}
  -- MTS Abstract Service
--  ExtendedCertificates, SecurityLabel, UniversalOrBMPString{}
    --==
--    FROM MTSAbstractService {joint-iso-itu-t mhs(6) mts(3) modules(0)
--      mts-abstract-service(1) version-1999(1)}
  -- Directory Authentication Framework
--  AlgorithmIdentifier, SIGNATURE{}, SIGNED{}
    --==
--    FROM AuthenticationFramework {joint-iso-itu-t ds(5) module(1)
--      authenticationFramework(7) 3}
  -- Directory Certificate Extensions
--  CertificateAssertion
    --==
--    FROM CertificateExtensions {joint-iso-itu-t ds(5) module(1)
--      certificateExtensions(26) 0}
  -- IPMS upper bounds
--  ub-alpha-code-length, ub-circulation-list-members, ub-distribution-codes,
--    ub-extended-subject-length, ub-information-categories,
--    ub-information-category-length, ub-manual-handling-instruction-length,
--    ub-manual-handling-instructions, ub-originators-reference-length,
--    ub-precedence
    --==
--    FROM IPMSUpperBounds {joint-iso-itu-t mhs(6) ipms(1) modules(0)
--      upper-bounds(10) version-1999(1)}
  -- IPMS Object Identifiers
--  id-hex-authorization-time, id-hex-auto-submitted,
--    id-hex-body-part-signatures, id-hex-circulation-list-recipients,
--    id-hex-distribution-codes, id-hex-extended-subject, id-hex-incomplete-copy,
--    id-hex-information-category, id-hex-ipm-security-label, id-hex-languages,
--    id-hex-manual-handling-instructions, id-hex-originators-reference,
--    id-hex-precedence-policy-id, id-rex-circulation-list-indicator,
--    id-rex-precedence
    --==
--    FROM IPMSObjectIdentifiers {joint-iso-itu-t mhs(6) ipms(1) modules(0)
--      object-identifiers(0) version-1999(1)};

-- Incomplete Copy
--incomplete-copy IPMS-EXTENSION ::= {
--  VALUE          IncompleteCopy,
--  IDENTIFIED BY  id-hex-incomplete-copy
--}

IncompleteCopy ::= NULL

-- Languages
--languages IPMS-EXTENSION ::= {
--  VALUE          SET OF Language,
--  IDENTIFIED BY  id-hex-languages
--}

Languages ::= SET OF Language

Language ::= PrintableString --(SIZE (2 | 5))

-- Auto-submitted
--auto-submitted IPMS-EXTENSION ::= {
--  VALUE          AutoSubmitted,
--  IDENTIFIED BY  id-hex-auto-submitted
--}

AutoSubmitted ::= ENUMERATED {
  not-auto-submitted(0), auto-generated(1), auto-replied(2)}

--body-part-signatures IPMS-EXTENSION ::= {
--  VALUE          BodyPartSignatures,
--  IDENTIFIED BY  id-hex-body-part-signatures
--}

Signature ::= SEQUENCE {
  algorithmIdentifier	AlgorithmIdentifier,
  encrypted		BIT STRING
}


BodyPartSignatures ::=
  SET OF
    SET {body-part-number                 BodyPartNumber,
         body-part-signature              BodyPartSignature,
         originator-certificate-selector  [1]  CertificateAssertion OPTIONAL,
         originator-certificates          [0]  ExtendedCertificates OPTIONAL --,
--         ... --}

BodyPartNumber ::= INTEGER --(1..MAX)

BodyPartSignature ::= Signature
--  SIGNATURE
--    {SEQUENCE {signature-algorithm-identifier  AlgorithmIdentifier,
--               body-part                       BodyPart,
--               body-part-security-label        SecurityLabel OPTIONAL
--    }}

--ipm-security-label IPMS-EXTENSION ::= {
--  VALUE          IPMSecurityLabel,
--  IDENTIFIED BY  id-hex-ipm-security-label
--}

IPMSecurityLabel ::= SEQUENCE {
  content-security-label     [0]  SecurityLabel,
  heading-security-label     [1]  SecurityLabel OPTIONAL,
  body-part-security-labels  [2]  SEQUENCE OF BodyPartSecurityLabel OPTIONAL
}

BodyPartSecurityLabel ::= CHOICE {
  body-part-unlabelled      [0]  NULL,
  body-part-security-label  [1]  SecurityLabel
}

-- Authorization Time
--authorization-time IPMS-EXTENSION ::= {
--  VALUE          AuthorizationTime,
--  IDENTIFIED BY  id-hex-authorization-time
--}

AuthorizationTime ::= GeneralizedTime

-- Circulation List
--circulation-list-recipients IPMS-EXTENSION ::= {
--  VALUE          CirculationList,
--  IDENTIFIED BY  id-hex-circulation-list-recipients
--}

CirculationList ::=
  SEQUENCE (SIZE (2..ub-circulation-list-members)) OF CirculationMember

CirculationMember ::= SET {
  circulation-recipient
    RecipientSpecifier
--      (WITH COMPONENTS {
--         ...,
--         recipient  (WITH COMPONENTS {
--                       ...,
--                       formal-name  PRESENT
--                     })
--       })--,
  checked                Checkmark OPTIONAL
}

Checkmark ::= CHOICE {
  simple       NULL,
  timestamped  CirculationTime,
  signed       CirculationSignature
}

CirculationTime ::= GeneralizedTime

CirculationSignatureData ::= 
--  SIGNED
--    { --SEQUENCE {algorithm-identifier  CirculationSignatureAlgorithmIdentifier,
               this-IPM              ThisIPMField,
               timestamp             CirculationTime} --}

-- expand SIGNED macro

CirculationSignature ::= SEQUENCE {
  circulation-signature-data	CirculationSignatureData,
  algorithm-identifier		AlgorithmIdentifier,
  encrypted			BIT STRING
}



CirculationSignatureAlgorithmIdentifier ::= AlgorithmIdentifier

-- Circulation List Indicator
--circulation-list-indicator IPMS-EXTENSION ::= {
--  VALUE          NULL,
--  IDENTIFIED BY  id-rex-circulation-list-indicator
--}

CirculationListIndicator ::= NULL

-- Distribution Codes
--distribution-codes IPMS-EXTENSION ::= {
--  VALUE          DistributionCodes,
--  IDENTIFIED BY  id-hex-distribution-codes
--}

DistributionCodes ::=
  SEQUENCE --(SIZE (1..ub-distribution-codes))-- OF DistributionCode

DistributionCode ::= SEQUENCE {
  oid-code           OBJECT IDENTIFIER OPTIONAL,
  alphanumeric-code  AlphaCode OPTIONAL,
  or-descriptor      [0]  ORDescriptor OPTIONAL
}

AlphaCode ::= UniversalOrBMPString --{ub-alpha-code-length}

-- Extended Subject
--extended-subject IPMS-EXTENSION ::= {
--  VALUE          ExtendedSubject,
--  IDENTIFIED BY  id-hex-extended-subject
--}

ExtendedSubject ::= UniversalOrBMPString--{ub-extended-subject-length}

-- Information category
--information-category IPMS-EXTENSION ::= {
--  VALUE          InformationCategories,
--  IDENTIFIED BY  id-hex-information-category
--}

InformationCategories ::=
  SEQUENCE --(SIZE (1..ub-information-categories))-- OF InformationCategory

InformationCategory ::= SEQUENCE {
  reference    [0]  OBJECT IDENTIFIER OPTIONAL,
  description  [1]  DescriptionString OPTIONAL
}

DescriptionString ::= UniversalOrBMPString --{ub-information-category-length}

-- Manual handling Instructions
--manual-handling-instructions IPMS-EXTENSION ::= {
--  VALUE          ManualHandlingInstructions,
--  IDENTIFIED BY  id-hex-manual-handling-instructions
--}

ManualHandlingInstructions ::=
  SEQUENCE --(SIZE (1..ub-manual-handling-instructions))-- OF
    ManualHandlingInstruction

ManualHandlingInstruction ::=
  UniversalOrBMPString --{ub-manual-handling-instruction-length}

-- Originator's Reference
--originators-reference IPMS-EXTENSION ::= {
--  VALUE          OriginatorsReference,
--  IDENTIFIED BY  id-hex-originators-reference
--}

OriginatorsReference ::= UniversalOrBMPString--{ub-originators-reference-length}

-- Precedence Policy Identifier
--precedence-policy-identifier IPMS-EXTENSION ::= {
--  VALUE          PrecedencePolicyIdentifier,
--  IDENTIFIED BY  id-hex-precedence-policy-id
--}

PrecedencePolicyIdentifier ::= OBJECT IDENTIFIER

-- Precedence
--precedence IPMS-EXTENSION ::= {
--  VALUE          Precedence,
--  IDENTIFIED BY  id-rex-precedence
--}

Precedence ::= INTEGER(0..ub-precedence)

-- END - - of IPMSHeadingExtensions

-- Module IPMSExtendedBodyPartTypes2 (X.420:06/1999)
-- IPMSExtendedBodyPartTypes2 {iso standard mhs(10021) ipms(7) modules(0)
--   extended-body-part-types-2(1)} DEFINITIONS IMPLICIT TAGS ::=
--BEGIN

-- Prologue
-- Exports everything.
--IMPORTS
  -- IPMS Information Objects
--  EXTENDED-BODY-PART-TYPE
    --==
--    FROM IPMSInformationObjects {joint-iso-itu-t mhs(6) ipms(1) modules(0)
--      information-objects(2) version-1999(1)}
  -- IPMS Object Identifiers
--  id-ep-general-text, id-et-general-text
    --==
--    FROM IPMSObjectIdentifiers {joint-iso-itu-t mhs(6) ipms(1) modules(0)
--      object-identifiers(0) version-1999(1)};

-- General Text body part
--general-text-body-part EXTENDED-BODY-PART-TYPE ::= {
--  PARAMETERS  {GeneralTextParameters
--               IDENTIFIED BY  id-ep-general-text},
--  DATA        {GeneralTextData
--               IDENTIFIED BY  id-et-general-text}
--}

GeneralTextParameters ::= SET OF CharacterSetRegistration

GeneralTextData ::= GeneralString

CharacterSetRegistration ::= INTEGER(1..32767)

--END - - of IPMSExtendedBodyPartTypes2

-- Module IPMSExtendedVoiceBodyPartType (X.420:06/1999)
--IPMSExtendedVoiceBodyPartType {joint-iso-itu-t mhs(6) ipms(1) modules(0)
--  extended-voice-body-part-type(11)} DEFINITIONS IMPLICIT TAGS ::=
--BEGIN

-- Prologue
-- Exports everything.
--IMPORTS
  -- IPMS Information Objects
--  EXTENDED-BODY-PART-TYPE
    --==
--    FROM IPMSInformationObjects {joint-iso-itu-t mhs(6) ipms(1) modules(0)
--      information-objects(2) version-1999(1)}
  -- IPMS Object Identifiers
--  id-ep-voice, id-et-voice
    --==
--    FROM IPMSObjectIdentifiers {joint-iso-itu-t mhs(6) ipms(1) modules(0)
--      object-identifiers(0) version-1999(1)};

-- Extended Voice body part
--voice-body-part EXTENDED-BODY-PART-TYPE ::= {
--  PARAMETERS  {VoiceParameters
--               IDENTIFIED BY  id-ep-voice},
--  DATA        {VoiceData
--               IDENTIFIED BY  id-et-voice}
--}

VoiceParameters ::= SEQUENCE {
  voice-message-duration     [0]  INTEGER OPTIONAL, -- In seconds
  voice-encoding-type        [1]  OBJECT IDENTIFIER,
  supplementary-information  [2]  IA5String OPTIONAL
}

VoiceData ::= OCTET STRING

--END - - of IPMSExtendedVoiceBodyPartType

-- Module IPMSForwardedContentBodyPartType (X.420:06/1999)
--IPMSForwardedContentBodyPartType {joint-iso-itu-t mhs(6) ipms(1) modules(0)
--  forwarded-content-body-part-type(15)} DEFINITIONS IMPLICIT TAGS ::=
--BEGIN

-- Prologue
-- Exports everything.
--IMPORTS
  -- MTS Abstract Service
--  Content, ExtendedContentType, MessageDeliveryIdentifier, MessageDeliveryTime,
--    MessageSubmissionEnvelope, OriginatingMTACertificate,
--    OtherMessageDeliveryFields, ProofOfSubmission
    --==
--    FROM MTSAbstractService {joint-iso-itu-t mhs(6) mts(3) modules(0)
--      mts-abstract-service(1) version-1999(1)}
  -- IPMS Information Objects
--  EXTENDED-BODY-PART-TYPE
    --==
--    FROM IPMSInformationObjects {joint-iso-itu-t mhs(6) ipms(1) modules(0)
--      information-objects(2) version-1999(1)}
  -- IPMS Object Identifiers
--  id-ep-content, id-et-content
    --==
--    FROM IPMSObjectIdentifiers {joint-iso-itu-t mhs(6) ipms(1) modules(0)
--      object-identifiers(0) version-1999(1)};

-- Forwarded Content body part
--content-body-part{ExtendedContentType:content-type} EXTENDED-BODY-PART-TYPE ::=
--  {
--  PARAMETERS
--    {ForwardedContentParameters
--     IDENTIFIED BY  {id-ep-content  content-type}},
--  DATA        {Content
--               IDENTIFIED BY  {id-et-content  content-type}}
--}

ForwardedContentParameters ::= SET {
  delivery-time      [0]  MessageDeliveryTime OPTIONAL,
  delivery-envelope  [1]  OtherMessageDeliveryFields OPTIONAL,
  mts-identifier     [2]  MessageDeliveryIdentifier OPTIONAL,
  submission-proof   [3]  SubmissionProof OPTIONAL
}

SubmissionProof ::= SET {
  proof-of-submission          [0]  ProofOfSubmission,
  originating-MTA-certificate  [1]  OriginatingMTACertificate,
  message-submission-envelope  MessageSubmissionEnvelope
}

END -- of IPMSForwardedContentBodyPartType

-- Generated by Asnp, the ASN.1 pretty-printer of France Telecom R&D