Move /asn1 to /epan/dissectors
[metze/wireshark/wip.git] / epan / dissectors / asn1 / ess / ExtendedSecurityServices.asn
1 -- ExtendedSecurityServices as defined in RFC5035
2 -- 
3 -- The ASN definition has been modified to suit the Wireshark asn2wrs compiler
4 -- 
5 -- 
6 -- 
7 -- The original ASN.1 definition from RFC5035 contains the following 
8 -- copyright statement:
9 -- 
10 -- Full Copyright Statement
11 -- 
12 --    Copyright (C) The IETF Trust (2007).
13 --
14 --    This document is subject to the rights, licenses and restrictions
15 --    contained in BCP 78, and except as set forth therein, the authors
16 --    retain all their rights.
17 --
18 --    This document and the information contained herein are provided on an
19 --    "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
20 --    OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND
21 --    THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS
22 --    OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
23 --    THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
24 --    WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
25 -- 
26
27 ExtendedSecurityServices
28      { iso(1) member-body(2) us(840) rsadsi(113549)
29        pkcs(1) pkcs-9(9) smime(16) modules(0) id-mod-ess-2006(30) }
30
31 DEFINITIONS IMPLICIT TAGS ::=
32 BEGIN
33
34 IMPORTS
35
36 -- Cryptographic Message Syntax (CMS)
37     ContentType, IssuerAndSerialNumber
38        FROM CryptographicMessageSyntax {iso(1) member-body(2)
39                 us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16)
40                 modules(0) cms-2004(24)}
41
42 -- X.509
43     AlgorithmIdentifier, CertificateSerialNumber
44        FROM AuthenticationFramework 
45        {joint-iso-itu-t ds(5) module(1) authenticationFramework(7) 3}
46
47     SubjectKeyIdentifier, PolicyInformation, GeneralNames
48        FROM CertificateExtensions
49        {joint-iso-ccitt ds(5) module(1) certificateExtensions(26) 0};
50
51
52 -- Extended Security Services
53
54 -- The construct "SEQUENCE SIZE (1..MAX) OF" appears in several ASN.1
55 -- constructs in this module. A valid ASN.1 SEQUENCE can have zero or
56 -- more entries. The SIZE (1..MAX) construct constrains the SEQUENCE to
57 -- have at least one entry. MAX indicates the upper bound is unspecified.
58 -- Implementations are free to choose an upper bound that suits their
59 -- environment.
60
61 -- UTF8String ::= [UNIVERSAL 12] IMPLICIT OCTET STRING
62
63 -- The contents are formatted as described in [UTF8]
64
65 -- Section 2.7
66
67 ReceiptRequest ::= SEQUENCE {
68   signedContentIdentifier ContentIdentifier,
69   receiptsFrom ReceiptsFrom,
70   receiptsTo SEQUENCE SIZE (1..ub-receiptsTo) OF GeneralNames
71 }
72
73 ub-receiptsTo INTEGER ::= 16
74
75 id-aa-receiptRequest OBJECT IDENTIFIER ::= { iso(1) member-body(2)
76     us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 1}
77
78 ContentIdentifier ::= OCTET STRING
79
80 id-aa-contentIdentifier OBJECT IDENTIFIER ::= { iso(1) member-body(2)
81     us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 7}
82
83 ReceiptsFrom ::= CHOICE {
84   allOrFirstTier [0] AllOrFirstTier,  -- formerly "allOrNone [0]AllOrNone"
85   receiptList [1] SEQUENCE OF GeneralNames
86 }
87
88 AllOrFirstTier ::= INTEGER { -- Formerly AllOrNone
89   allReceipts (0),
90   firstTierRecipients (1)
91 }
92
93 -- Section 2.8
94
95 Receipt ::= SEQUENCE {
96   version ESSVersion,
97   contentType ContentType,
98   signedContentIdentifier ContentIdentifier,
99   originatorSignatureValue OCTET STRING
100 }
101
102 id-ct-receipt OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840)
103    rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-ct(1) 1}
104
105 ESSVersion ::= INTEGER  { v1(1) }
106
107 -- Section 2.9
108
109 ContentHints ::= SEQUENCE {
110   contentDescription UTF8String (SIZE (1..MAX)) OPTIONAL,
111   contentType ContentType
112 }
113
114 id-aa-contentHint OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840)
115     rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 4}
116
117 -- Section 2.10
118
119 MsgSigDigest ::= OCTET STRING
120
121 id-aa-msgSigDigest OBJECT IDENTIFIER ::= { iso(1) member-body(2)
122     us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 5}
123
124 -- Section 2.11
125
126 ContentReference ::= SEQUENCE {
127   contentType ContentType,
128   signedContentIdentifier ContentIdentifier,
129   originatorSignatureValue OCTET STRING
130 }
131
132 id-aa-contentReference   OBJECT IDENTIFIER ::= { iso(1) member-body(2)
133     us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 10 }
134
135 -- Section 3.2
136
137 ESSSecurityLabel ::= SET {
138   security-policy-identifier SecurityPolicyIdentifier,
139   security-classification SecurityClassification OPTIONAL,
140   privacy-mark ESSPrivacyMark OPTIONAL,
141   security-categories SecurityCategories OPTIONAL
142 }
143
144  id-aa-securityLabel OBJECT IDENTIFIER ::= { iso(1) member-body(2)
145      us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 2}
146
147 SecurityPolicyIdentifier ::= OBJECT IDENTIFIER
148
149 SecurityClassification ::= INTEGER {
150   unmarked (0),
151   unclassified (1),
152   restricted (2),
153   confidential (3),
154   secret (4),
155   top-secret (5)
156 }(0..ub-integer-options)
157
158 ub-integer-options INTEGER ::= 256
159
160 ESSPrivacyMark ::= CHOICE {
161     pString      PrintableString (SIZE (1..ub-privacy-mark-length)),
162     utf8String   UTF8String (SIZE (1..MAX))
163 }
164
165 ub-privacy-mark-length INTEGER ::= 128
166
167 SecurityCategories ::= SET SIZE (1..ub-security-categories) OF SecurityCategory
168
169 ub-security-categories INTEGER ::= 64
170
171 SecurityCategory ::= SEQUENCE {
172   type  [0] OBJECT IDENTIFIER,
173   value [1] ANY DEFINED BY type
174 }
175
176 --Note: The aforementioned SecurityCategory syntax produces identical
177 --hex encodings as the following SecurityCategory syntax that is
178 --documented in the X.411 specification:
179 --
180 --SecurityCategory ::= SEQUENCE {
181 --     type  [0]  SECURITY-CATEGORY,
182 --     value [1]  ANY DEFINED BY type }
183 --
184 --SECURITY-CATEGORY MACRO ::=
185 --BEGIN
186 --TYPE NOTATION ::= type | empty
187 --VALUE NOTATION ::= value (VALUE OBJECT IDENTIFIER)
188 --END
189
190 -- this is a commonly used definition of security categories
191
192 RestrictiveTag ::= SEQUENCE {
193   tagName               OBJECT IDENTIFIER,
194   attributeFlags        BIT STRING
195 }
196
197 EnumeratedTag ::= SEQUENCE {
198   tagName               OBJECT IDENTIFIER,
199   attributeList         SET OF SecurityAttribute
200 }
201
202 PermissiveTag ::= SEQUENCE {
203   tagName               OBJECT IDENTIFIER,
204   attributeFlags        BIT STRING
205 }
206
207 SecurityAttribute ::= INTEGER
208
209 InformativeTag ::= SEQUENCE {
210   tagName               OBJECT IDENTIFIER,
211   attributes            FreeFormField
212 }
213
214 FreeFormField ::= CHOICE {
215   bitSetAttributes      BIT STRING,
216   securityAttributes    SET OF SecurityAttribute
217 }
218
219 -- Section 3.4
220
221 EquivalentLabels ::= SEQUENCE OF ESSSecurityLabel
222
223 id-aa-equivalentLabels OBJECT IDENTIFIER ::= { iso(1) member-body(2)
224     us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 9}
225
226 -- Section 4.4
227
228 MLExpansionHistory ::= SEQUENCE
229       SIZE (1..ub-ml-expansion-history) OF MLData
230
231 id-aa-mlExpandHistory OBJECT IDENTIFIER ::= { iso(1) member-body(2)
232     us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 3}
233
234 ub-ml-expansion-history INTEGER ::= 64
235
236 MLData ::= SEQUENCE {
237   mailListIdentifier EntityIdentifier,
238   expansionTime GeneralizedTime,
239   mlReceiptPolicy MLReceiptPolicy OPTIONAL
240 }
241
242 EntityIdentifier ::= CHOICE {
243   issuerAndSerialNumber IssuerAndSerialNumber,
244   subjectKeyIdentifier SubjectKeyIdentifier
245 }
246
247 MLReceiptPolicy ::= CHOICE {
248   none [0] NULL,
249   insteadOf [1] SEQUENCE SIZE (1..MAX) OF GeneralNames,
250   inAdditionTo [2] SEQUENCE SIZE (1..MAX) OF GeneralNames
251 }
252
253 -- Section 5.4
254
255 SigningCertificate ::=  SEQUENCE {
256     certs        SEQUENCE OF ESSCertID,
257     policies     SEQUENCE OF PolicyInformation OPTIONAL
258 }
259
260 id-aa-signingCertificate OBJECT IDENTIFIER ::= { iso(1)
261     member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
262     smime(16) id-aa(2) 12 }
263
264 SigningCertificateV2 ::=  SEQUENCE {
265     certs        SEQUENCE OF ESSCertIDv2,
266     policies     SEQUENCE OF PolicyInformation OPTIONAL
267 }
268
269 id-aa-signingCertificateV2 OBJECT IDENTIFIER ::= { iso(1)
270     member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
271     smime(16) id-aa(2) 47 }
272
273 id-sha256  OBJECT IDENTIFIER  ::=  { joint-iso-itu-t(2)
274     country(16) us(840) organization(1) gov(101)
275     csor(3) nistalgorithm(4) hashalgs(2) 1 }
276
277 ESSCertIDv2 ::= SEQUENCE {
278      hashAlgorithm           AlgorithmIdentifier
279             DEFAULT {algorithm id-sha256},
280      certHash                Hash,
281      issuerSerial            IssuerSerial OPTIONAL
282 }
283
284 ESSCertID ::=  SEQUENCE {
285      certHash                 Hash,
286      issuerSerial             IssuerSerial OPTIONAL
287 }
288
289 Hash ::= OCTET STRING -- SHA1 hash of entire certificate
290
291 IssuerSerial ::= SEQUENCE {
292      issuer                   GeneralNames,
293      serialNumber             CertificateSerialNumber
294 }
295
296 END -- of ExtendedSecurityServices
297