Debian Codegraph @

src/tmttv2.asn

raw
1 -- tmttv2.asn - X.509v3 profile for the BSI Sphinx project
2 -- Copyright (C) 2001 g10 Code GmbH
3 --
4 -- This file is part of KSBA.
5 --
6 -- KSBA is free software; you can redistribute it and/or modify
7 -- it under the terms of either
8 --
9 -- - the GNU Lesser General Public License as published by the Free
10 -- Software Foundation; either version 3 of the License, or (at
11 -- your option) any later version.
12 --
13 -- or
14 --
15 -- - the GNU General Public License as published by the Free
16 -- Software Foundation; either version 2 of the License, or (at
17 -- your option) any later version.
18 --
19 -- or both in parallel, as here.
20 --
21 -- KSBA is distributed in the hope that it will be useful, but WITHOUT
22 -- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
23 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
24 -- License for more details.
25 --
26 -- You should have received a copies of the GNU General Public License
27 -- and the GNU Lesser General Public License along with this program;
28 -- if not, see <http://www.gnu.org/licenses/>.
29 --
30
31
32 TMTTv2 {iso(1) identified-organization(3) dod(6) internet(1)
33 security(5) mechanisms(5) teletrust(1) foo(17)}
34
35 DEFINITIONS IMPLICIT TAGS ::=
36
37 BEGIN
38
39
40 -- standard object identifiers
41
42 id-ce OBJECT IDENTIFIER ::= {joint-iso-ccitt(2) ds(5) 29}
43
44
45
46
47 -- (TMTTv2 3.1)
48 Certificate ::= SEQUENCE {
49 tbsCertificate TBSCertificate,
50 signatureAlgorithm AlgorithmIdentifier,
51 signature BIT STRING
52 }
53
54 AlgorithmIdentifier ::= SEQUENCE {
55 algorithm OBJECT IDENTIFIER,
56 parameters ANY DEFINED BY algorithm OPTIONAL
57 -- should be used but set to NULL
58 }
59
60 TBSCertificate ::= SEQUENCE {
61 version [0] EXPLICIT Version DEFAULT v1,
62 serialNumber CertificateSerialNumber,
63 signature AlgorithmIdentifier,
64 issuer Name,
65 validity Validity,
66 subject Name,
67 subjectPublicKeyInfo SubjectPublicKeyInfo,
68 issuerUniqueID [1] IMPLICIT UniqueIdentifier OPTIONAL,
69 subjectUniqueID [2] IMPLICIT UniqueIdentifier OPTIONAL,
70 extensions [3] EXPLICIT Extensions OPTIONAL
71 }
72
73 -- (TMTTv2 3.1.1)
74 Version ::= INTEGER { v1(0), v2(1), v3(2) }
75 -- Ony v3 is used which is the default anyway
76
77 -- (TMTTv2 3.1.2)
78 CertificateSerialNumber ::= INTEGER
79 -- Must support length of up to 15 byte
80
81 -- (TMTTv2 3.1.4)
82 Name ::= CHOICE {
83 rdnSequence RDNSequence
84 }
85
86 RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
87
88 RelativeDistinguishedName ::= SET OF AttributeTypeAndValue
89 -- pkix defines a SIZE (1 .. MAX), we use a maximum of 1 to avoid
90 -- problems with some LDAP implementations.
91
92 Attribute ::= SEQUENCE { -- not specified by TMTT
93 type AttributeType,
94 values SET OF AttributeValue
95 }
96
97 Attributes ::= SET OF Attribute
98
99 AttributeTypeAndValue ::= SEQUENCE {
100 type AttributeType,
101 value AttributeValue
102 }
103
104 AttributeType ::= OBJECT IDENTIFIER
105
106 AttributeValue ::= ANY
107
108 DirectoryString ::= CHOICE {
109 printableString PrintableString (SIZE (1..maxSize)),
110 teletexString TeletexString (SIZE (1..maxSize)),
111 utf8String UTF8String (SIZE (1..maxSize)),
112 bmpString BMPString (SIZE(1..maxSize)),
113 universalString UniversalString (SIZE (1..maxSize))
114 }
115 -- For Sphinx conformity maxSize must be:
116 -- BusinessCategory 128 LocalityName 128 StateOrProvince 128
117 -- CommonName 128 PostalCode 40 SurName 64
118 -- CountryName 2 OrganizationalUnit 64 Title 64
119 -- GivenName 64 OrganizationalName 64
120
121 -- (TMTTv2 3.1.5)
122 Validity ::= SEQUENCE {
123 notBefore Time,
124 notAfter Time
125 }
126
127 Time ::= CHOICE {
128 utcTime UTCTime,
129 generalTime GeneralizedTime
130 }
131 -- fixme: explain constraints
132
133 --(TMTTv2 3.1.7)
134 SubjectPublicKeyInfo ::= SEQUENCE {
135 algorithm AlgorithmIdentifier,
136 subjectPublicKey BIT STRING
137 }
138
139 --(TMTTv2 3.1.9)
140 Extensions ::= SEQUENCE SIZE (1..MAX) OF Extension
141
142 Extension ::= SEQUENCE {
143 extnID OBJECT IDENTIFIER,
144 critical BOOLEAN DEFAULT FALSE,
145 extnValue OCTET STRING
146 }
147
148
149 UniqueIdentifier ::= BIT STRING
150
151 -- (TMTTv2 3.2.1)
152 AuthorityKeyIdentifier ::= SEQUENCE {
153 keyIdentifier [0] KeyIdentifier OPTIONAL,
154 authorityCertIssuer [1] GeneralNames OPTIONAL,
155 authorityCertSerialNumber [2] CertificateSerialNumber OPTIONAL
156 }
157 -- Fixme: our parser cant handle this:
158 -- ( WITH COMPONENTS { ..., authorityCertIssuer PRESENT,
159 -- authorityCertSerialNumber PRESENT}
160 -- | WITH COMPONENTS { ..., authorityCertIssuer ABSENT,
161 -- authorityCertSerialNumber ABSENT }
162 -- )
163
164 KeyIdentifier ::= OCTET STRING
165
166 -- (TMTTv2 3.2.3)
167 KeyUsage ::= BIT STRING {
168 digitalSignature (0),
169 nonRepudiation (1),
170 keyEncipherment (2),
171 dataEncipherment (3),
172 keyAgreement (4),
173 keyCertSign (5),
174 cRLSign (6),
175 encipherOnly (7),
176 decipherOnly (8)
177 }
178
179
180 -- (TMTTv2 3.2.5)
181 CertificatePolicies ::= SEQUENCE SIZE (1..MAX) OF PolicyInformation
182
183 PolicyInformation ::= SEQUENCE {
184 policyIdentifier CertPolicyId,
185 policyQualifiers SEQUENCE SIZE (1..MAX) OF PolicyQualifierInfo OPTIONAL
186 }
187
188 CertPolicyId ::= OBJECT IDENTIFIER
189
190 PolicyQualifierInfo ::= SEQUENCE {
191 policyQualifierId PolicyQualifierId,
192 qualifier ANY DEFINED BY policyQualifierId
193 }
194
195 PolicyQualifierId ::= OBJECT IDENTIFIER -- missing in TMTTv2 document
196
197 -- (TMTTv2 3.2.6)
198 PolicyMappingsSyntax ::= SEQUENCE SIZE (1..MAX) OF SEQUENCE {
199 issuerDomainPolicy CertPolicyId,
200 subjectDomainPolicy CertPolicyId
201 }
202
203
204 -- (TMTTv2 3.2.7)
205 SubjectAltName ::= GeneralNames
206
207 GeneralNames ::= SEQUENCE SIZE (1..MAX) OF GeneralName
208
209 GeneralName ::= CHOICE {
210 otherName [0] OtherName, -- INSTANCE OF OTHER-NAME
211 rfc822Name [1] IA5String,
212 dNSName [2] IA5String,
213 x400Address [3] ORAddress,
214 directoryName [4] Name,
215 ediPartyName [5] EDIPartyName,
216 uniformResourceIdentifier [6] IA5String,
217 iPAddress [7] OCTET STRING,
218 registeredID [8] OBJECT IDENTIFIER
219 }
220
221 OtherName ::= SEQUENCE {
222 type-id OBJECT IDENTIFIER,
223 value [0] EXPLICIT ANY DEFINED BY type-id
224 }
225
226 EDIPartyName ::= SEQUENCE {
227 nameAssigner [0] DirectoryString OPTIONAL,
228 partyName [1] DirectoryString
229 }
230
231 -- (TMTTv2 3.2.9)
232 SubjectDirectoryAttributes ::= SEQUENCE SIZE (1..MAX) OF Attribute
233
234 -- (TMTTv2 3.2.10)
235 -- id-biometricData OBJECT IDENTIFIE ::= { fixme 1 }
236
237 BiometricData ::= SET OF SEQUENCE {
238 typeId OBJECT IDENTIFIER,
239 value ANY DEFINED BY typeId
240 }
241
242
243 -- (TMTTv2 3.2.11)
244 BasicConstraints ::= SEQUENCE {
245 cA BOOLEAN DEFAULT FALSE,
246 pathLenConstraint INTEGER (0..MAX) OPTIONAL
247 }
248
249 -- (TMTTv2 3.2.12)
250 NameConstraints ::= SEQUENCE {
251 permittedSubtrees [0] GeneralSubtrees OPTIONAL,
252 excludedSubtrees [1] GeneralSubtrees OPTIONAL
253 }
254
255 GeneralSubtrees ::= SEQUENCE SIZE (1..MAX) OF GeneralSubtree
256
257 GeneralSubtree ::= SEQUENCE {
258 base GeneralName,
259 minimum [0] BaseDistance DEFAULT 0,
260 maximum [1] BaseDistance OPTIONAL
261 }
262
263 BaseDistance ::= INTEGER (0..MAX)
264
265 -- (TMTTv2 3.2.13)
266 PolicyConstraintsSyntax ::= SEQUENCE SIZE (1..MAX) OF SEQUENCE {
267 requireExplicitPolicy [0] SkipCerts OPTIONAL,
268 inhibitPolicyMapping [1] SkipCerts OPTIONAL
269 }
270
271 SkipCerts ::= INTEGER (0..MAX)
272
273
274 -- (TMTTv2 3.2.14)
275 CRLDistPointsSyntax ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint
276
277 DistributionPoint ::= SEQUENCE {
278 distributionPoint [0] DistributionPointName OPTIONAL,
279 reasons [1] ReasonFlags OPTIONAL,
280 cRLIssuer [2] GeneralNames OPTIONAL
281 }
282
283 DistributionPointName ::= CHOICE {
284 fullName [0] GeneralNames,
285 nameRelativeToCRLIssuer [1] RelativeDistinguishedName
286 }
287
288 ReasonFlags ::= BIT STRING {
289 unused (0),
290 keyCompromise (1),
291 cACompromise (2),
292 affiliationChanged (3),
293 superseded (4),
294 cessationOfOperation (5),
295 certificateHold (6)
296 }
297
298
299 -- (TMTTv2 3.2.15)
300 -- id-issuerCertDistributionPoint OBJECT IDENTIFIER ::= { fixme 28 }
301
302 IssuerCertDistributionPoint ::= IA5String
303
304
305 -- (TMTTv2 3.2.16)
306 -- id-subjectCertDistributionPoint OBJECT IDENTIFIER ::= { fixme 3 }
307
308 SubjectCertDistributionPoint ::= IA5String
309
310
311 -- (TMTTv2 3.2.17)
312 -- id-policyDistributionPoint OBJECT IDENTIFIER ::= { fixme 4 }
313
314 PolicyDistributionPoint ::= IA5String
315
316
317 -- (TMTTv2 3.2.18)
318 -- id-testIdentifier OBECJT IDENTIFIER ::= { fixme 5 }
319
320 TestIdentifier ::= UTF8String
321
322
323 --
324 -- (TMTTv2 4.1)
325 CertificateList ::= SEQUENCE {
326 tbsCertList TBSCertList,
327 signatureAlgorithm AlgorithmIdentifier,
328 signatureValue BIT STRING
329 }
330
331 TBSCertList ::= SEQUENCE {
332 version Version OPTIONAL, -- should be v2 if present
333 signature AlgorithmIdentifier,
334 issuer Name,
335 thisUpdate Time,
336 nextUpdate Time OPTIONAL, -- must be used in TMTT
337 revokedCertificates SEQUENCE OF SEQUENCE {
338 userCertificate CertificateSerialNumber,
339 revocationDate Time,
340 crlEntryExtensions Extensions OPTIONAL -- should be v2 if present
341 } OPTIONAL,
342 crlExtensions [0] EXPLICIT Extensions OPTIONAL -- v2 is present
343 }
344
345
346 -- (TMTTv2 4.2.1)
347 CRLReason ::= ENUMERATED {
348 unspecified (0), -- not allowed in TMTT
349 keyCompromise (1),
350 cACompromise (2),
351 affiliationChanged (3),
352 superseded (4),
353 cessationOfOperation (5),
354 certificateHold (6),
355 removeFromCRL (8) -- should not be used because
356 -- Delta-CRLs are not supported
357 }
358
359 -- (TMTTv2 4.2.3)
360 InvalidityDate ::= GeneralizedTime
361
362
363 -- (TMTTv2 4.2.4)
364 CertificateIssuer ::= GeneralNames
365
366 -- (TMTTv2 4.3.3)
367 cRLNumber ::= INTEGER (1..MAX)
368
369 -- (TMTTv2 4.3.4)
370 issuingDistributionPoint ::= SEQUENCE {
371 distributionPoint [0] DistributionPointName OPTIONAL,
372 onlyContainsUserCerts [1] BOOLEAN DEFAULT FALSE,
373 onlyContainsCACerts [2] BOOLEAN DEFAULT FALSE,
374 onlySomeReasons [3] ReasonFlags OPTIONAL,
375 indirectCRL [4] BOOLEAN DEFAULT FALSE
376 }
377
378
379 --
380 -- PKCS-10
381 -- CertificationRequest ::= SEQUENCE {
382 -- certificationRequestInfo CertificationRequestInfo,
383 -- signatureAlgorithm SignatureAlgorithmIdentifier,
384 -- signature Signature
385 -- }
386
387 CertificationRequestInfo ::= SEQUENCE {
388 certificationRequestInfo Version,
389 subject Name,
390 subjectPublicKeyInfo SubjectPublicKeyInfo,
391 attributes [0] IMPLICIT Attributes
392 }
393
394
395
396
397 --
398 -------------------------
399 -- x400 address syntax --
400 -------------------------
401 ORAddress ::= SEQUENCE {
402 built-in-standard-attributes BuiltInStandardAttributes,
403 built-in-domain-defined-attributes BuiltInDomainDefinedAttributes OPTIONAL,
404 extension-attributes ExtensionAttributes OPTIONAL
405 }
406
407 BuiltInStandardAttributes ::= SEQUENCE {
408 country-name CountryName OPTIONAL,
409 administration-domain-name AdministrationDomainName OPTIONAL,
410 network-address [0] EXPLICIT NetworkAddress OPTIONAL,
411 terminal-identifier [1] EXPLICIT TerminalIdentifier OPTIONAL,
412 private-domain-name [2] EXPLICIT PrivateDomainName OPTIONAL,
413 organization-name [3] EXPLICIT OrganizationName OPTIONAL,
414 numeric-user-identifier [4] EXPLICIT NumericUserIdentifier OPTIONAL,
415 personal-name [5] EXPLICIT PersonalName OPTIONAL,
416 organizational-unit-names [6] EXPLICIT OrganizationalUnitNames OPTIONAL
417 }
418
419 CountryName ::= [APPLICATION 1] CHOICE {
420 x121-dcc-code NumericString (SIZE (ub-country-name-numeric-length)),
421 iso-3166-alpha2-code PrintableString (SIZE (ub-country-name-alpha-length))
422 }
423
424 AdministrationDomainName ::= [APPLICATION 2] EXPLICIT CHOICE {
425 numeric NumericString (SIZE (0..ub-domain-name-length)),
426 printable PrintableString (SIZE (0..ub-domain-name-length))
427 }
428
429 NetworkAddress ::= X121Address -- see also extended-network-address
430
431 X121Address ::= NumericString (SIZE (1..ub-x121-address-length))
432
433 TerminalIdentifier ::= PrintableString (SIZE (1..ub-terminal-id-length))
434
435 PrivateDomainName ::= CHOICE {
436 numeric NumericString (SIZE (1..ub-domain-name-length)),
437 printable PrintableString (SIZE (1..ub-domain-name-length))
438 }
439
440 OrganizationName ::= PrintableString (SIZE (1..ub-organization-name-length))
441 -- see also teletex-organization-name
442
443 NumericUserIdentifier ::= NumericString (SIZE (1..ub-numeric-user-id-length))
444
445 PersonalName ::= SET { -- see also teletex-personal-name
446 surname [0] PrintableString (SIZE (1..ub-surname-length)),
447 given-name [1] PrintableString (SIZE (1..ub-given-name-length)) OPTIONAL,
448 initials [2] PrintableString (SIZE (1..ub-initials-length)) OPTIONAL,
449 generation-qualifier [3] PrintableString
450 (SIZE (1..ub-generation-qualifier-length)) OPTIONAL
451 }
452
453
454 OrganizationalUnitNames ::= SEQUENCE SIZE (1..ub-organizational-units)
455 OF OrganizationalUnitName
456 -- see also teletex-organizational-unit-names
457
458 OrganizationalUnitName ::= PrintableString
459 (SIZE (1..ub-organizational-unit-name-length))
460
461
462 BuiltInDomainDefinedAttributes ::=
463 SEQUENCE SIZE (1..ub-domain-defined-attributes)
464 OF BuiltInDomainDefinedAttribute
465
466 BuiltInDomainDefinedAttribute ::= SEQUENCE {
467 type PrintableString (SIZE (1..ub-domain-defined-attribute-type-length)),
468 value PrintableString (SIZE (1..ub-domain-defined-attribute-value-length))
469 }
470
471
472 ExtensionAttributes ::= SET SIZE (1..ub-extension-attributes)
473 OF ExtensionAttribute
474
475 ExtensionAttribute ::= SEQUENCE {
476 extension-attribute-type [0] EXPLICIT INTEGER (0..ub-extension-attributes),
477 extension-attribute-value [1] EXPLICIT ANY DEFINED BY
478 extension-attribute-type
479 }
480
481
482 END