s4:torture: Adapt KDC canon test to Heimdal upstream changes
[samba.git] / source4 / heimdal / lib / asn1 / rfc2459.asn1
1 -- $Id$ --
2 -- Definitions from RFCs 2459, 3280, 5280
3 --
4 -- Note that those RFCs come with *two* ASN.1 modules, one being a default-
5 -- EXPLICIT tagged module, and the other being default-IMPLICIT.  Some types
6 -- are in one module, while others are in the other.  Here the two modules
7 -- are merged into a single default-EXPLICIT tagged module, with IMPLICIT added
8 -- for all tags for types in the default-IMPLICIT module.
9
10 RFC2459 DEFINITIONS ::= BEGIN
11
12 IMPORTS HEIM_ANY FROM heim
13         PrincipalName, Realm FROM krb5;
14      -- For OtherName we really want to also import:
15      -- KRB5PrincipalName FROM pkinit
16      -- PermanentIdentifier FROM rfc4043
17      -- HardwareModuleName FROM rfc4108;
18      -- But we can't because that creates circular dependencies.
19
20 Version ::=  INTEGER {
21         rfc3280_version_1(0),
22         rfc3280_version_2(1),
23         rfc3280_version_3(2)
24 }
25
26 id-pkcs-1 OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840)
27         rsadsi(113549) pkcs(1) 1 }
28 id-pkcs1-rsaEncryption OBJECT IDENTIFIER ::=            { id-pkcs-1 1 }
29 id-pkcs1-md2WithRSAEncryption OBJECT IDENTIFIER ::=     { id-pkcs-1 2 }
30 id-pkcs1-md5WithRSAEncryption OBJECT IDENTIFIER ::=     { id-pkcs-1 4 }
31 id-pkcs1-sha1WithRSAEncryption OBJECT IDENTIFIER ::=    { id-pkcs-1 5 }
32 id-pkcs1-sha256WithRSAEncryption OBJECT IDENTIFIER ::=  { id-pkcs-1 11 }
33 id-pkcs1-sha384WithRSAEncryption OBJECT IDENTIFIER ::=  { id-pkcs-1 12 }
34 id-pkcs1-sha512WithRSAEncryption OBJECT IDENTIFIER ::=  { id-pkcs-1 13 }
35
36 id-heim-rsa-pkcs1-x509 OBJECT IDENTIFIER ::= { 1  2 752 43 16 1 }
37
38 id-pkcs-2 OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840)
39         rsadsi(113549) pkcs(1) 2 }
40 id-pkcs2-md2 OBJECT IDENTIFIER ::=              { id-pkcs-2 2 }
41 id-pkcs2-md4 OBJECT IDENTIFIER ::=              { id-pkcs-2 4 }
42 id-pkcs2-md5 OBJECT IDENTIFIER ::=              { id-pkcs-2 5 }
43
44 id-rsa-digestAlgorithm OBJECT IDENTIFIER ::=
45 { iso(1) member-body(2) us(840) rsadsi(113549) 2 }
46
47 id-rsa-digest-md2 OBJECT IDENTIFIER ::= { id-rsa-digestAlgorithm 2 }
48 id-rsa-digest-md4 OBJECT IDENTIFIER ::= { id-rsa-digestAlgorithm 4 }
49 id-rsa-digest-md5 OBJECT IDENTIFIER ::= { id-rsa-digestAlgorithm 5 }
50
51 id-pkcs-3 OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840)
52         rsadsi(113549) pkcs(1) 3 }
53
54 id-pkcs3-rc2-cbc OBJECT IDENTIFIER ::=          { id-pkcs-3 2 }
55 id-pkcs3-rc4     OBJECT IDENTIFIER ::=          { id-pkcs-3 4 }
56 id-pkcs3-des-ede3-cbc OBJECT IDENTIFIER ::=     { id-pkcs-3 7 }
57
58 id-rsadsi-encalg OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840)
59         rsadsi(113549) 3 }
60
61 id-rsadsi-rc2-cbc OBJECT IDENTIFIER ::=         { id-rsadsi-encalg 2 }
62 id-rsadsi-des-ede3-cbc OBJECT IDENTIFIER ::=    { id-rsadsi-encalg 7 }
63
64 id-secsig-sha-1 OBJECT IDENTIFIER ::= { iso(1) identified-organization(3)
65         oiw(14) secsig(3) algorithm(2) 26 }
66
67 id-secsig-sha-1WithRSAEncryption OBJECT IDENTIFIER ::= { iso(1) identified-organization(3)
68         oiw(14) secsig(3) algorithm(2) 29 }
69
70 id-nistAlgorithm OBJECT IDENTIFIER ::= {
71    joint-iso-itu-t(2) country(16) us(840) organization(1) gov(101) csor(3) 4 }
72   
73 id-nist-aes-algs OBJECT IDENTIFIER ::= { id-nistAlgorithm 1 }
74
75 id-aes-128-cbc OBJECT IDENTIFIER ::=            { id-nist-aes-algs 2 }
76 id-aes-192-cbc OBJECT IDENTIFIER ::=            { id-nist-aes-algs 22 }
77 id-aes-256-cbc OBJECT IDENTIFIER ::=            { id-nist-aes-algs 42 }
78
79 id-nist-sha-algs OBJECT IDENTIFIER ::=          { id-nistAlgorithm 2 }
80
81 id-sha256 OBJECT IDENTIFIER ::=                 { id-nist-sha-algs 1 }
82 id-sha224 OBJECT IDENTIFIER ::=                 { id-nist-sha-algs 4 }
83 id-sha384 OBJECT IDENTIFIER ::=                 { id-nist-sha-algs 2 }
84 id-sha512 OBJECT IDENTIFIER ::=                 { id-nist-sha-algs 3 }
85
86 id-dhpublicnumber OBJECT IDENTIFIER ::= {
87         iso(1) member-body(2) us(840) ansi-x942(10046)
88         number-type(2) 1 }
89
90 -- ECC
91
92 id-ecPublicKey OBJECT IDENTIFIER ::= {
93        iso(1) member-body(2) us(840) ansi-X9-62(10045) keyType(2) 1 }
94
95 id-ecDH OBJECT IDENTIFIER ::= {
96        iso(1) identified-organization(3) certicom(132) schemes(1)
97        ecdh(12) }
98
99 id-ecMQV OBJECT IDENTIFIER ::= {
100        iso(1) identified-organization(3) certicom(132) schemes(1)
101        ecmqv(13) }
102
103 id-ecdsa-with-SHA512 OBJECT IDENTIFIER ::= {
104      iso(1) member-body(2) us(840) ansi-X9-62(10045) signatures(4)
105      ecdsa-with-SHA2(3) 4 }
106
107 id-ecdsa-with-SHA384 OBJECT IDENTIFIER ::= {
108      iso(1) member-body(2) us(840) ansi-X9-62(10045) signatures(4)
109      ecdsa-with-SHA2(3) 3 }
110
111 id-ecdsa-with-SHA256 OBJECT IDENTIFIER ::= {
112      iso(1) member-body(2) us(840) ansi-X9-62(10045) signatures(4)
113      ecdsa-with-SHA2(3) 2 }
114
115 id-ecdsa-with-SHA224 OBJECT IDENTIFIER ::= {
116      iso(1) member-body(2) us(840) ansi-X9-62(10045) signatures(4)
117      ecdsa-with-SHA2(3) 1 }
118
119 id-ecdsa-with-SHA1 OBJECT IDENTIFIER ::= {
120      iso(1) member-body(2) us(840) ansi-X9-62(10045) signatures(4) 1 }
121
122 -- some EC group ids
123
124 id-ec-group-secp256r1 OBJECT IDENTIFIER ::= {
125        iso(1) member-body(2) us(840) ansi-X9-62(10045) curves(3)
126        prime(1) 7 }
127
128 id-ec-group-secp160r1 OBJECT IDENTIFIER ::= {
129        iso(1) identified-organization(3) certicom(132) 0 8 }
130
131 id-ec-group-secp160r2 OBJECT IDENTIFIER ::= {
132        iso(1) identified-organization(3) certicom(132) 0 30 }
133
134 id-ec-group-secp224r1 OBJECT IDENTIFIER ::= {
135        iso(1) identified-organization(3) certicom(132) 0 33 }
136
137 id-ec-group-secp384r1 OBJECT IDENTIFIER ::= {
138        iso(1) identified-organization(3) certicom(132) 0 34 }
139
140 id-ec-group-secp521r1 OBJECT IDENTIFIER ::= {
141        iso(1) identified-organization(3) certicom(132) 0 35 }
142
143 -- DSA
144
145 id-x9-57 OBJECT IDENTIFIER ::= {
146         iso(1) member-body(2) us(840) ansi-x942(10046) 4 }
147
148 id-dsa OBJECT IDENTIFIER ::=            { id-x9-57 1 }
149 id-dsa-with-sha1 OBJECT IDENTIFIER ::=          { id-x9-57 3 }
150
151 -- x.520 names types
152
153 id-x520-at      OBJECT IDENTIFIER ::= { joint-iso-ccitt(2) ds(5) 4 }
154
155 id-at-commonName                OBJECT IDENTIFIER ::= { id-x520-at 3 }
156 id-at-surname                   OBJECT IDENTIFIER ::= { id-x520-at 4 }
157 id-at-serialNumber              OBJECT IDENTIFIER ::= { id-x520-at 5 }
158 id-at-countryName               OBJECT IDENTIFIER ::= { id-x520-at 6 }
159 id-at-localityName              OBJECT IDENTIFIER ::= { id-x520-at 7 }
160 id-at-stateOrProvinceName       OBJECT IDENTIFIER ::= { id-x520-at 8 }
161 id-at-streetAddress             OBJECT IDENTIFIER ::= { id-x520-at 9 }
162 id-at-organizationName          OBJECT IDENTIFIER ::= { id-x520-at 10 }
163 id-at-organizationalUnitName    OBJECT IDENTIFIER ::= { id-x520-at 11 }
164 id-at-title                     OBJECT IDENTIFIER ::= { id-x520-at 12 }
165 id-at-description               OBJECT IDENTIFIER ::= { id-x520-at 13 }
166 id-at-name                      OBJECT IDENTIFIER ::= { id-x520-at 41 }
167 id-at-givenName                 OBJECT IDENTIFIER ::= { id-x520-at 42 }
168 id-at-initials                  OBJECT IDENTIFIER ::= { id-x520-at 43 }
169 id-at-generationQualifier       OBJECT IDENTIFIER ::= { id-x520-at 44 }
170 id-at-dnQualifier               OBJECT IDENTIFIER ::= { id-x520-at 46 }
171 id-at-pseudonym                 OBJECT IDENTIFIER ::= { id-x520-at 65 }
172 -- RFC 2247
173 id-Userid                       OBJECT IDENTIFIER ::=
174                           { 0 9 2342 19200300 100 1 1 }
175 id-domainComponent              OBJECT IDENTIFIER ::=
176                           { 0 9 2342 19200300 100 1 25 }
177
178 id-at-emailAddress          AttributeType ::=
179     { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 9 1 }
180
181
182
183 -- rfc3280
184
185 id-x509-ce OBJECT IDENTIFIER ::= {joint-iso-ccitt(2) ds(5) 29}
186
187 AlgorithmIdentifier ::= SEQUENCE {
188         algorithm       OBJECT IDENTIFIER,
189         parameters      HEIM_ANY OPTIONAL
190 }
191
192 AttributeType ::=   OBJECT IDENTIFIER
193
194 AttributeValue ::=   HEIM_ANY
195
196 DirectoryString ::= CHOICE {
197         ia5String       IA5String,
198         teletexString   TeletexString,
199         printableString PrintableString,
200         universalString UniversalString,
201         utf8String      UTF8String,
202         bmpString       BMPString
203 }
204
205 AttributeValues ::= SET OF AttributeValue
206
207 Attribute ::= SEQUENCE {
208         type    AttributeType,
209         value   AttributeValues
210 }
211
212 AttributeTypeAndValue ::= SEQUENCE {
213         type    AttributeType,
214         value   DirectoryString
215 }
216
217 -- RDNs really should be SET OF SingleAttribute per the RFCs, but making that
218 -- change will affect lib/hx509 code, so we'll wait.  The issue is that there
219 -- is code in lib/hx509 and in lib/asn1/check-gen.c that assumes that the
220 -- `value` of an rdn is a `DirectoryString` and not an open type.
221 --
222 -- Also, it's really not worth making this change, as a) it will increase the
223 -- amount of code needed in lib/hx509, and b) it really is useful to be able to
224 -- assume RDN values are ultimately only strings, c) we don't have any attrs
225 -- for RDNs that aren't strings, and d) the non-string attributes from TCG that
226 -- are used in SubjectDirectoryAttributes will never be used here (so we hope).
227 --
228 -- Until we fix this lib/hx509 cannot support name attributes whose type isn't
229 -- DirectoryString.  For example, the UID attribute is broken at this time, as
230 -- that wants NumericString.
231 --
232 RelativeDistinguishedName ::= SET OF AttributeTypeAndValue -- XXX SingleAttribute
233
234 RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
235
236 Name ::= CHOICE {
237         rdnSequence  RDNSequence
238 }
239
240 CertificateSerialNumber ::= INTEGER
241
242 Time ::= CHOICE {
243      utcTime        UTCTime,
244      generalTime    GeneralizedTime
245 }
246
247 Validity ::= SEQUENCE {
248      notBefore      Time,
249      notAfter       Time
250 }
251
252 UniqueIdentifier  ::=  BIT STRING
253
254 SubjectPublicKeyInfo  ::=  SEQUENCE  {
255      algorithm            AlgorithmIdentifier,
256      subjectPublicKey     BIT STRING
257 }
258
259 -- XXX Should be _OTHER-NAME ::= _TYPE-IDENTIFIER
260 _OTHER-NAME ::= CLASS {
261     &id OBJECT IDENTIFIER UNIQUE,
262     &Type
263 }
264
265 OtherName{_OTHER-NAME:OtherNameSet} ::= SEQUENCE {
266     type-id     _OTHER-NAME.&id({OtherNameSet}),
267     value       [0] _OTHER-NAME.&Type({OtherNameSet}{@type-id})
268 }
269
270 _ATTRIBUTE ::= CLASS {
271     &id             OBJECT IDENTIFIER UNIQUE,
272     &Type           OPTIONAL,
273  -- &equality-match MATCHING-RULE OPTIONAL,
274     &minCount       INTEGER DEFAULT 1,
275     &maxCount       INTEGER OPTIONAL
276 }
277
278 SingleAttribute{_ATTRIBUTE:AttrSet} ::= SEQUENCE {
279     type      _ATTRIBUTE.&id({AttrSet}),
280     value     _ATTRIBUTE.&Type({AttrSet}{@type})
281 }
282
283 AttributeSet{_ATTRIBUTE:AttrSet} ::= SEQUENCE {
284     type      _ATTRIBUTE.&id({AttrSet}),
285     values    SET --SIZE (1..MAX)-- OF _ATTRIBUTE.&Type({AttrSet}{@type})
286 }
287
288 _EXTENSION ::= CLASS {
289     &id  OBJECT IDENTIFIER UNIQUE,
290     &ExtnType,
291     &Critical    BOOLEAN DEFAULT FALSE
292 }
293
294 Extension{_EXTENSION:ExtensionSet} ::= SEQUENCE {
295     extnID      _EXTENSION.&id({ExtensionSet}),
296     critical    BOOLEAN
297 --                     (EXTENSION.&Critical({ExtensionSet}{@extnID}))
298                      DEFAULT FALSE,
299     extnValue   OCTET STRING (CONTAINING
300                 _EXTENSION.&ExtnType({ExtensionSet}{@extnID}))
301 }
302
303 Extensions  ::=  SEQUENCE SIZE (1..MAX) OF Extension
304
305 TBSCertificate  ::=  SEQUENCE  {
306      version         [0]  Version OPTIONAL, -- EXPLICIT nnn DEFAULT 1,
307      serialNumber         CertificateSerialNumber,
308      signature            AlgorithmIdentifier,
309      issuer               Name,
310      validity             Validity,
311      subject              Name,
312      subjectPublicKeyInfo SubjectPublicKeyInfo,
313      issuerUniqueID  [1]  IMPLICIT BIT STRING -- UniqueIdentifier -- OPTIONAL,
314                           -- If present, version shall be v2 or v3
315      subjectUniqueID [2]  IMPLICIT BIT STRING -- UniqueIdentifier -- OPTIONAL,
316                           -- If present, version shall be v2 or v3
317      extensions      [3]  EXPLICIT Extensions OPTIONAL
318                           -- If present, version shall be v3
319 }
320
321 Certificate  ::=  SEQUENCE  {
322      tbsCertificate       TBSCertificate,
323      signatureAlgorithm   AlgorithmIdentifier,
324      signatureValue       BIT STRING
325 }
326
327 Certificates ::= SEQUENCE OF Certificate
328
329 ValidationParms ::= SEQUENCE {
330         seed            BIT STRING,
331         pgenCounter     INTEGER
332 }
333
334 DomainParameters ::= SEQUENCE {
335         p               INTEGER, -- odd prime, p=jq +1
336         g               INTEGER, -- generator, g
337         q               INTEGER OPTIONAL, -- factor of p-1
338         j               INTEGER OPTIONAL, -- subgroup factor
339         validationParms ValidationParms OPTIONAL -- ValidationParms
340 }
341
342 -- As defined by PKCS3
343 DHParameter ::= SEQUENCE {
344         prime           INTEGER, -- odd prime, p=jq +1
345         base            INTEGER, -- generator, g
346         privateValueLength INTEGER OPTIONAL
347 }
348
349 DHPublicKey ::= INTEGER
350
351 GeneralName ::= CHOICE {
352         otherName                       [0]     IMPLICIT OtherName,
353         rfc822Name                      [1]     IMPLICIT IA5String,
354         dNSName                         [2]     IMPLICIT IA5String,
355 --      x400Address                     [3]     IMPLICIT ORAddress,--
356         directoryName                   [4]     IMPLICIT Name,
357 --      ediPartyName                    [5]     IMPLICIT EDIPartyName, --
358         uniformResourceIdentifier       [6]     IMPLICIT IA5String,
359         iPAddress                       [7]     IMPLICIT OCTET STRING,
360         registeredID                    [8]     IMPLICIT OBJECT IDENTIFIER
361 }
362
363 GeneralNames ::= SEQUENCE SIZE (1..MAX) OF GeneralName
364
365 id-x509-ce-keyUsage OBJECT IDENTIFIER ::=  { id-x509-ce 15 }
366
367 KeyUsage ::= BIT STRING {
368         digitalSignature        (0),
369         nonRepudiation          (1),
370         keyEncipherment         (2),
371         dataEncipherment        (3),
372         keyAgreement            (4),
373         keyCertSign             (5),
374         cRLSign                 (6),
375         encipherOnly            (7),
376         decipherOnly            (8)
377 }
378
379 -- private key usage period extension OID and syntax
380
381 PrivateKeyUsagePeriod ::= SEQUENCE {
382      notBefore       [0] IMPLICIT GeneralizedTime OPTIONAL,
383      notAfter        [1] IMPLICIT GeneralizedTime OPTIONAL
384      -- either notBefore or notAfter MUST be present
385 }
386
387 -- certificate policies extension OID and syntax
388
389 _POLICYQUALIFIERINFO ::= CLASS { -- Heimdal extension
390     &id  OBJECT IDENTIFIER UNIQUE,
391     &Type
392 }
393
394 CertPolicyId ::= OBJECT IDENTIFIER
395 PolicyQualifierId ::= OBJECT IDENTIFIER -- ( id-qt-cps | id-qt-unotice )
396
397 PolicyQualifierInfo{_POLICYQUALIFIERINFO:PolicyQualifierSet} ::= SEQUENCE {
398     policyQualifierId   _POLICYQUALIFIERINFO.&id({PolicyQualifierSet}),
399     qualifier _POLICYQUALIFIERINFO.&Type({PolicyQualifierSet}{@policyQualifierId})
400 }
401
402 PolicyQualifierInfos ::= SEQUENCE SIZE (1..MAX) OF PolicyQualifierInfo
403
404 PolicyInformation ::= SEQUENCE {
405      policyIdentifier   CertPolicyId,
406      policyQualifiers   PolicyQualifierInfos OPTIONAL
407 }
408
409 CertificatePolicies ::= SEQUENCE SIZE (1..MAX) OF PolicyInformation
410
411 -- CPS pointer qualifier
412
413 CPSuri ::= IA5String
414
415 -- user notice qualifier
416
417 DisplayText ::= CHOICE {
418      ia5String        IA5String,        --(SIZE (1..200))
419      visibleString    VisibleString,    --(SIZE (1..200))
420      bmpString        BMPString,        --(SIZE (1..200))
421      utf8String       UTF8String        --(SIZE (1..200))
422 }
423
424 NoticeReference ::= SEQUENCE {
425      organization     DisplayText,
426      noticeNumbers    SEQUENCE OF INTEGER
427 }
428
429 UserNotice ::= SEQUENCE {
430      noticeRef        NoticeReference OPTIONAL,
431      explicitText     DisplayText OPTIONAL
432 }
433
434 -- policy mapping extension OID and syntax
435
436 PolicyMapping ::= SEQUENCE {
437      issuerDomainPolicy      CertPolicyId,
438      subjectDomainPolicy     CertPolicyId
439 }
440
441 PolicyMappings ::= SEQUENCE SIZE (1..MAX) OF PolicyMapping
442
443 -- subject key identifier OID and syntax
444
445 id-x509-ce-authorityKeyIdentifier OBJECT IDENTIFIER ::=  { id-x509-ce 35 }
446
447 KeyIdentifier ::= OCTET STRING
448
449 AuthorityKeyIdentifier ::= SEQUENCE {
450         keyIdentifier             [0] IMPLICIT OCTET STRING OPTIONAL,
451         authorityCertIssuer       [1] IMPLICIT -- GeneralName --
452                 SEQUENCE -- SIZE (1..MAX) -- OF GeneralName OPTIONAL,
453         authorityCertSerialNumber [2] IMPLICIT INTEGER OPTIONAL
454 }
455
456 id-x509-ce-subjectKeyIdentifier OBJECT IDENTIFIER ::=  { id-x509-ce 14 }
457
458 SubjectKeyIdentifier ::= KeyIdentifier
459
460 id-x509-ce-basicConstraints OBJECT IDENTIFIER ::=  { id-x509-ce 19 }
461
462 BasicConstraints ::= SEQUENCE {
463         cA                      BOOLEAN DEFAULT FALSE,
464         pathLenConstraint       INTEGER (0..4294967295) OPTIONAL
465 }
466
467 id-x509-ce-nameConstraints OBJECT IDENTIFIER ::=  { id-x509-ce 30 }
468
469 BaseDistance ::= INTEGER (0..4294967295)
470
471 GeneralSubtree ::= SEQUENCE {
472         base                    GeneralName,
473         minimum         [0]     IMPLICIT BaseDistance DEFAULT 0,
474         maximum         [1]     IMPLICIT BaseDistance OPTIONAL
475 }
476
477 GeneralSubtrees ::= SEQUENCE -- SIZE (1..MAX) -- OF GeneralSubtree
478
479 NameConstraints ::= SEQUENCE {
480         permittedSubtrees       [0]     IMPLICIT -- GeneralSubtrees -- SEQUENCE OF GeneralSubtree OPTIONAL,
481         excludedSubtrees        [1]     IMPLICIT -- GeneralSubtrees -- SEQUENCE OF GeneralSubtree OPTIONAL
482 }
483
484 id-x509-ce-privateKeyUsagePeriod OBJECT IDENTIFIER ::=  { id-x509-ce 16 }
485 id-x509-ce-certificatePolicies OBJECT IDENTIFIER ::=  { id-x509-ce 32 }
486 id-x509-ce-certificatePolicies-anyPolicy OBJECT IDENTIFIER ::= { id-x509-ce-certificatePolicies 0 }
487 id-x509-ce-policyMappings OBJECT IDENTIFIER ::=  { id-x509-ce 33 }
488 id-x509-ce-subjectAltName OBJECT IDENTIFIER ::=  { id-x509-ce 17 }
489 id-x509-ce-issuerAltName OBJECT IDENTIFIER ::=  { id-x509-ce 18 }
490 id-x509-ce-subjectDirectoryAttributes OBJECT IDENTIFIER ::=  { id-x509-ce 9 }
491 id-x509-ce-policyConstraints OBJECT IDENTIFIER ::=  { id-x509-ce 36 }
492
493 id-x509-ce-extKeyUsage OBJECT IDENTIFIER ::= { id-x509-ce 37}
494 id-x509-ce-anyExtendedKeyUsage OBJECT IDENTIFIER ::= { id-x509-ce-extKeyUsage 0 }
495
496 ExtKeyUsage ::= SEQUENCE OF OBJECT IDENTIFIER
497
498 id-x509-ce-cRLReasons OBJECT IDENTIFIER ::= { id-x509-ce 21 }
499 id-x509-ce-cRLDistributionPoints OBJECT IDENTIFIER ::=  { id-x509-ce 31 }
500 id-x509-ce-deltaCRLIndicator OBJECT IDENTIFIER ::= { id-x509-ce 27 }
501 id-x509-ce-issuingDistributionPoint OBJECT IDENTIFIER ::= { id-x509-ce 28 }
502 id-x509-ce-holdInstructionCode OBJECT IDENTIFIER ::= { id-x509-ce 23 }
503 id-x509-ce-invalidityDate OBJECT IDENTIFIER ::= { id-x509-ce 24 }
504 id-x509-ce-certificateIssuer   OBJECT IDENTIFIER ::= { id-x509-ce 29 }
505 id-x509-ce-inhibitAnyPolicy OBJECT IDENTIFIER ::=  { id-x509-ce 54 }
506
507 -- Heimdal extension
508 id-heim-ce-pkinit-princ-max-life OBJECT IDENTIFIER ::=
509     { iso(1) member-body(2) se(752) su(43) heim-pkix(16) 4 }
510
511
512 DistributionPointReasonFlags ::= BIT STRING {
513         unused                  (0),
514         keyCompromise           (1),
515         cACompromise            (2),
516         affiliationChanged      (3),
517         superseded              (4),
518         cessationOfOperation    (5),
519         certificateHold         (6),
520         privilegeWithdrawn      (7),
521         aACompromise            (8)
522 }
523
524 DistributionPointName ::= CHOICE {
525         fullName                [0]     IMPLICIT -- GeneralNames --  SEQUENCE SIZE (1..MAX) OF GeneralName,
526         nameRelativeToCRLIssuer [1]     RelativeDistinguishedName
527 }
528
529 DistributionPoint ::= SEQUENCE {
530         distributionPoint       [0]     IMPLICIT DistributionPointName OPTIONAL,
531         reasons                 [1]     IMPLICIT DistributionPointReasonFlags OPTIONAL,
532         cRLIssuer               [2]     IMPLICIT GeneralNames OPTIONAL
533 }
534
535 CRLDistributionPoints ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint
536
537
538 -- rfc3279
539
540 DSASigValue  ::=  SEQUENCE {
541         r       INTEGER,
542         s       INTEGER
543 }
544
545 DSAPublicKey ::= INTEGER
546
547 DSAParams  ::=  SEQUENCE {
548         p       INTEGER,
549         q       INTEGER,
550         g       INTEGER
551 }
552
553 -- draft-ietf-pkix-ecc-subpubkeyinfo-11
554
555 ECPoint ::= OCTET STRING
556
557 ECParameters ::= CHOICE {
558         namedCurve         OBJECT IDENTIFIER
559         -- implicitCurve   NULL
560         -- specifiedCurve  SpecifiedECDomain
561 }
562
563 ECDSA-Sig-Value ::= SEQUENCE {
564      r  INTEGER,
565      s  INTEGER
566 }
567
568 -- really pkcs1
569
570 RSAPublicKey ::= SEQUENCE {
571         modulus INTEGER, -- n
572         publicExponent INTEGER -- e
573 }
574
575 RSAPrivateKey ::= SEQUENCE {
576         version INTEGER (0..4294967295),
577         modulus INTEGER, -- n
578         publicExponent INTEGER, -- e
579         privateExponent INTEGER, -- d
580         prime1 INTEGER, -- p
581         prime2 INTEGER, -- q
582         exponent1 INTEGER, -- d mod (p-1)
583         exponent2 INTEGER, -- d mod (q-1)
584         coefficient INTEGER -- (inverse of q) mod p
585 }
586
587 DigestInfo ::= SEQUENCE {
588         digestAlgorithm AlgorithmIdentifier,
589         digest OCTET STRING
590 }
591
592 -- some ms ext
593
594 -- szOID_ENROLL_CERTTYPE_EXTENSION "1.3.6.1.4.1.311.20.2" is Encoded as a
595
596 -- UNICODESTRING (0x1E tag)
597
598 -- szOID_CERTIFICATE_TEMPLATE "1.3.6.1.4.1.311.21.7" is Encoded as:
599
600 -- TemplateVersion ::= INTEGER (0..4294967295)
601
602 -- CertificateTemplate ::= SEQUENCE {
603 --      templateID OBJECT IDENTIFIER,
604 --      templateMajorVersion TemplateVersion,
605 --      templateMinorVersion TemplateVersion OPTIONAL
606 -- }
607
608
609 --
610 -- CRL
611 --
612
613 TBSCRLCertList ::=  SEQUENCE  {
614         version                 Version OPTIONAL, -- if present, MUST be v2
615         signature               AlgorithmIdentifier,
616         issuer                  Name,
617         thisUpdate              Time,
618         nextUpdate              Time OPTIONAL,
619         revokedCertificates     SEQUENCE OF SEQUENCE  {
620                 userCertificate         CertificateSerialNumber,
621                 revocationDate          Time,
622                 crlEntryExtensions      Extensions OPTIONAL
623                                                 -- if present, MUST be v2
624         } OPTIONAL,
625         crlExtensions           [0] EXPLICIT Extensions OPTIONAL
626                                                 -- if present, MUST be v2
627 }
628
629
630 CRLCertificateList ::=  SEQUENCE  {
631         tbsCertList          TBSCRLCertList,
632         signatureAlgorithm   AlgorithmIdentifier,
633         signatureValue       BIT STRING
634 }
635
636 id-x509-ce-cRLNumber OBJECT IDENTIFIER ::= { id-x509-ce 20 }
637 id-x509-ce-freshestCRL OBJECT IDENTIFIER ::=  { id-x509-ce 46 }
638 id-x509-ce-cRLReason OBJECT IDENTIFIER ::= { id-x509-ce 21 }
639
640 CRLReason ::= ENUMERATED {
641         unspecified             (0),
642         keyCompromise           (1),
643         cACompromise            (2),
644         affiliationChanged      (3),
645         superseded              (4),
646         cessationOfOperation    (5),
647         certificateHold         (6),
648         removeFromCRL           (8),
649         privilegeWithdrawn      (9),
650         aACompromise           (10)
651 }
652
653 PKIXXmppAddr ::= UTF8String
654
655 SRVName ::= IA5String -- (SIZE (1..MAX)), but our compiler doesn't do that
656
657 id-pkix OBJECT IDENTIFIER ::= { iso(1) identified-organization(3)
658             dod(6) internet(1) security(5) mechanisms(5) pkix(7) }
659
660 id-pkix-on OBJECT IDENTIFIER ::= { id-pkix 8 }
661 id-pkix-on-xmppAddr OBJECT IDENTIFIER ::= { id-pkix-on 5 }
662 id-pkix-on-dnsSRV OBJECT IDENTIFIER ::= { id-pkix-on 7 }
663
664 -- From RFC4108
665 id-pkix-on-hardwareModuleName OBJECT IDENTIFIER ::= { id-pkix-on 4 }
666 HardwareModuleName ::= SEQUENCE {
667   hwType OBJECT IDENTIFIER,
668   hwSerialNum OCTET STRING
669 }
670
671 -- XXX Not really the right name
672 id-pkix-on-pkinit-san   OBJECT IDENTIFIER ::=
673   { iso(1) org(3) dod(6) internet(1) security(5) kerberosv5(2)
674     x509-sanan(2) }
675 KRB5PrincipalName ::= SEQUENCE {
676        realm                   [0] Realm,
677        principalName           [1] PrincipalName
678 }
679
680 -- From RFC4043:
681 -- Permanent identifier Object Identifier and Syntax
682 id-pkix-on-permanentIdentifier   OBJECT IDENTIFIER ::= { id-pkix-on 3 }
683
684 PermanentIdentifier ::= SEQUENCE {
685      identifierValue    UTF8String             OPTIONAL,
686                      -- if absent, use the serialNumber attribute
687                      -- if there is a single such attribute present
688                      -- in the subject DN
689      assigner           OBJECT IDENTIFIER      OPTIONAL
690                      -- if absent, the assigner is
691                      -- the certificate issuer
692 }
693
694 -- EKUs
695 id-pkix-kp OBJECT IDENTIFIER ::= { id-pkix 3 }
696 id-pkix-kp-serverAuth OBJECT IDENTIFIER ::= { id-pkix-kp 1 }
697 id-pkix-kp-clientAuth OBJECT IDENTIFIER ::= { id-pkix-kp 2 }
698 id-pkix-kp-codeSigning OBJECT IDENTIFIER ::= { id-pkix-kp 3 }
699 id-pkix-kp-emailProtection OBJECT IDENTIFIER ::= { id-pkix-kp 4 }
700 id-pkix-kp-ipsecEndSystem OBJECT IDENTIFIER ::= { id-pkix-kp 5 }
701 id-pkix-kp-ipsecTunnel OBJECT IDENTIFIER ::= { id-pkix-kp 6 }
702 id-pkix-kp-ipsecUser OBJECT IDENTIFIER ::= { id-pkix-kp 7 }
703 id-pkix-kp-timeStamping OBJECT IDENTIFIER ::= { id-pkix-kp 8 }
704 id-pkix-kp-OCSPSigning OBJECT IDENTIFIER ::= { id-pkix-kp 9 }
705 -- The following are taken from RFC7299 and others
706 id-pkix-kp-DVCS OBJECT IDENTIFIER ::= { id-pkix-kp 10 }
707 id-pkix-kp-ipsecIKE OBJECT IDENTIFIER ::= { id-pkix-kp 17 }
708 id-pkix-kp-capwapAC OBJECT IDENTIFIER ::= { id-pkix-kp 18 }
709 id-pkix-kp-capwapWTP OBJECT IDENTIFIER ::= { id-pkix-kp 19 }
710 id-pkix-kp-sipDomain OBJECT IDENTIFIER ::= { id-pkix-kp 20 }        -- RFC5924
711 id-pkix-kp-secureShellClient OBJECT IDENTIFIER ::= { id-pkix-kp 21 }
712 id-pkix-kp-secureShellServer OBJECT IDENTIFIER ::= { id-pkix-kp 22 }
713 id-pkix-kp-sendRouter OBJECT IDENTIFIER ::= { id-pkix-kp 23 }
714 id-pkix-kp-sendProxiedRouter OBJECT IDENTIFIER ::= { id-pkix-kp 24 }
715 id-pkix-kp-sendOwner OBJECT IDENTIFIER ::= { id-pkix-kp 25 }
716 id-pkix-kp-sendProxiedOwner OBJECT IDENTIFIER ::= { id-pkix-kp 26 }
717 id-pkix-kp-cmcCA OBJECT IDENTIFIER ::= { id-pkix-kp 27 }            -- RFC6402
718 id-pkix-kp-cmcRA OBJECT IDENTIFIER ::= { id-pkix-kp 28 }            -- RFC6402
719 id-pkix-kp-cmcArchive OBJECT IDENTIFIER ::= { id-pkix-kp 29 }       -- RFC6402
720 id-pkix-kp-bgpsec-router OBJECT IDENTIFIER ::= { id-pkix-kp 30 }    -- RFC8209
721 -- The following are MSFT EKUs taken from OpenSSL
722 id-msft OBJECT IDENTIFIER ::= { 1 3 6 1 4 1 311 }
723 id-msft-kp-msCodeInd OBJECT IDENTIFIER ::= { id-msft 2 1 21 }
724 id-msft-kp-msCodeCom OBJECT IDENTIFIER ::= { id-msft 2 1 22 }
725 id-msft-kp-msCTLSign OBJECT IDENTIFIER ::= { id-msft 10 3 1 }
726 id-msft-kp-msSGC OBJECT IDENTIFIER ::= { id-msft 10 3 3 }
727 id-msft-kp-msEFS OBJECT IDENTIFIER ::= { id-msft 10 3 4 }
728 id-msft-kp-msSmartcardLogin OBJECT IDENTIFIER ::= { id-msft 20 2 2 }
729 id-msft-kp-msUPN OBJECT IDENTIFIER ::= { id-msft 20 2 3 }
730
731 id-pkix-pe OBJECT IDENTIFIER ::= { id-pkix 1 }
732 id-pkix-pe-authorityInfoAccess OBJECT IDENTIFIER ::= { id-pkix-pe 1 }
733
734 AccessDescription  ::=  SEQUENCE {
735         accessMethod          OBJECT IDENTIFIER,
736         accessLocation        GeneralName
737 }
738
739 AuthorityInfoAccessSyntax ::= SEQUENCE SIZE (1..MAX) OF AccessDescription
740
741 -- RFC 3820 Proxy Certificate Profile
742
743 id-pkix-pe-proxyCertInfo OBJECT IDENTIFIER ::= { id-pkix-pe 14 }
744
745 id-pkix-pe-subjectInfoAccess OBJECT IDENTIFIER ::= { id-pkix-pe 11 }
746
747 SubjectInfoAccessSyntax  ::=
748        SEQUENCE SIZE (1..MAX) OF AccessDescription
749
750 id-pkix-ppl  OBJECT IDENTIFIER ::= { id-pkix 21 }
751
752 id-pkix-ppl-anyLanguage     OBJECT IDENTIFIER ::= { id-pkix-ppl 0 }
753 id-pkix-ppl-inheritAll      OBJECT IDENTIFIER ::= { id-pkix-ppl 1 }
754 id-pkix-ppl-independent     OBJECT IDENTIFIER ::= { id-pkix-ppl 2 }
755
756 ProxyPolicy ::= SEQUENCE {
757         policyLanguage          OBJECT IDENTIFIER,
758         policy                  OCTET STRING OPTIONAL
759 }
760
761 ProxyCertInfo ::= SEQUENCE {
762         pCPathLenConstraint     INTEGER (0..4294967295) OPTIONAL, -- really MAX
763         proxyPolicy             ProxyPolicy
764 }
765
766 -- TCG contents:
767
768 -- See tcg.asn1 for commentary.
769
770 --TCG specific OIDs
771 tcg OBJECT IDENTIFIER ::= {joint-iso-itu-t(2) international-organizations(23) tcg(133)}
772 tcg-attribute                   OBJECT IDENTIFIER ::= {tcg 2}
773 tcg-kp                          OBJECT IDENTIFIER ::= {tcg 8}
774
775 --TCG Attribute OIDs
776 tcg-at-tpmManufacturer          OBJECT IDENTIFIER ::= {tcg-attribute 1}
777 tcg-at-tpmModel                 OBJECT IDENTIFIER ::= {tcg-attribute 2}
778 tcg-at-tpmVersion               OBJECT IDENTIFIER ::= {tcg-attribute 3}
779 tcg-at-tpmSpecification         OBJECT IDENTIFIER ::= {tcg-attribute 16}
780 tcg-at-tpmSecurityAssertions    OBJECT IDENTIFIER ::= {tcg-attribute 18}
781
782 --TCG Attribute objects
783 at-TPMSecurityAssertions _ATTRIBUTE ::= { &Type TPMSecurityAssertions, &id tcg-at-tpmSecurityAssertions }
784 at-TPMManufacturer _ATTRIBUTE ::= { &Type AliasUTF8String, --(SIZE (1..STRMAX))-- &id tcg-at-tpmManufacturer }
785 at-TPMModel _ATTRIBUTE ::= { &Type AliasUTF8String, --(SIZE (1..STRMAX))-- &id tcg-at-tpmModel }
786 at-TPMVersion _ATTRIBUTE ::= { &Type AliasUTF8String, --(SIZE (1..STRMAX))-- &id tcg-at-tpmVersion }
787 at-TPMSpecification _ATTRIBUTE ::= { &Type TPMSpecification, &id tcg-at-tpmSpecification }
788
789 --TCG Extended Key Usage OIDs
790 tcg-kp-EKCertificate            OBJECT IDENTIFIER ::= {tcg-kp 1}
791
792 -- OIDs not in the module in TCG_IWG_EKCredentialProfile_v2p3_r2_pub but in
793 -- TCG_IWG_DevID_v1r2_02dec2020 (missing arc names not mentioned in the TCG
794 -- specs):
795 tcg-tpm20                       OBJECT IDENTIFIER ::= {tcg 1 2} -- this OID is not named in the TCG specs
796 tcg-on-ekPermIdSha256           OBJECT IDENTIFIER ::= {tcg 12 1} -- assigner value for PermanentIdentifier SAN
797 tcg-cap-verifiedTPMResidency    OBJECT IDENTIFIER ::= {tcg 11 1 1} -- policy OID
798 tcg-cap-verifiedTPMFixed        OBJECT IDENTIFIER ::= {tcg 11 1 2} -- policy OID
799 tcg-cap-verifiedTPMRestricted   OBJECT IDENTIFIER ::= {tcg 11 1 3} -- policy OID
800
801 EKGenerationType ::= ENUMERATED {
802     ekgt-internal (0),
803     ekgt-injected (1),
804     ekgt-internalRevocable(2),
805     ekgt-injectedRevocable(3)
806 }
807 EKGenerationLocation ::= ENUMERATED {
808     tpmManufacturer (0),
809     platformManufacturer (1),
810     ekCertSigner (2)
811 }
812 EKCertificateGenerationLocation ::= EKGenerationLocation -- XXX
813 EvaluationAssuranceLevel ::= ENUMERATED {
814     ealevell (1),
815     ealevel2 (2),
816     ealevel3 (3),
817     ealevel4 (4),
818     ealevel5 (5),
819     ealevel6 (6),
820     ealevel7 (7)
821 }
822 SecurityLevel ::= ENUMERATED {
823     sllevel1 (1),
824     sllevel2 (2),
825     sllevel3 (3),
826     sllevel4 (4)
827 }
828 StrengthOfFunction ::= ENUMERATED {
829     sof-basic (0),
830     sof-medium (1),
831     sof-high (2)
832 }
833 URIReference ::= SEQUENCE {
834     uniformResourceIdentifier IA5String, -- (SIZE (1..URIMAX))
835     hashAlgorithm AlgorithmIdentifier OPTIONAL,
836     hashValue BIT STRING OPTIONAL
837 }
838 EvaluationStatus ::= ENUMERATED {
839     designedToMeet (0),
840     evaluationInProgress (1),
841     evaluationCompleted (2)
842 }
843
844 --tcg specification attributes for tpm
845 TPMSpecification ::= SEQUENCE {
846     family UTF8String, -- (SIZE (1..STRMAX))
847     level INTEGER (0..4294967295),
848     revision INTEGER (0..4294967295),
849     ...
850 }
851
852
853 --common criteria evaluation
854 CommonCriteriaMeasures ::= SEQUENCE {
855     version IA5String, -- (SIZE (1..STRMAX)) “2.2” or “3.1”;future syntax defined by CC
856     assurancelevel EvaluationAssuranceLevel,
857     evaluationStatus EvaluationStatus,
858     plus BOOLEAN DEFAULT FALSE,
859     strengthOfFunction [0] IMPLICIT StrengthOfFunction OPTIONAL,
860     profileOid [1] IMPLICIT OBJECT IDENTIFIER OPTIONAL,
861     profileUri [2] IMPLICIT URIReference OPTIONAL,
862     targetOid [3] IMPLICIT OBJECT IDENTIFIER OPTIONAL,
863     targetUri [4] IMPLICIT URIReference OPTIONAL,
864     ...
865 }
866
867 --fips evaluation
868 FIPSLevel ::= SEQUENCE {
869     version IA5String, -- (SIZE (1..STRMAX)) “140-1” or “140-2”
870     level SecurityLevel,
871     plus BOOLEAN DEFAULT FALSE,
872     ...
873 }
874
875 --tpm security assertions
876 TPMVersion ::= INTEGER { tpm-v1(0) }
877 TPMSecurityAssertions ::= SEQUENCE {
878     version TPMVersion DEFAULT 0, -- v1
879     fieldUpgradable BOOLEAN DEFAULT FALSE,
880     -- The TCG EK cert profile spec says all these context tags are IMPLICIT,
881     -- but samples in the field have them as EXPLICIT.
882     ekGenerationType [0] EXPLICIT EKGenerationType OPTIONAL,
883     ekGenerationLocation [1] EXPLICIT EKGenerationLocation OPTIONAL,
884     ekCertificateGenerationLocation [2] EXPLICIT EKCertificateGenerationLocation OPTIONAL,
885     ccInfo [3] EXPLICIT CommonCriteriaMeasures OPTIONAL,
886     fipsLevel [4] EXPLICIT FIPSLevel OPTIONAL,
887     iso9000Certified [5] EXPLICIT BOOLEAN DEFAULT FALSE,
888     iso9000Uri IA5String OPTIONAL, -- (SIZE (1..URIMAX))
889     ...
890 }
891
892 -- Back to OtherName, SingleAttribute, AttributeSet, and Extension
893
894 -- XXX Not really the right name for this OID:
895 id-pkix-on-pkinit-ms-san OBJECT IDENTIFIER ::=
896   { iso(1) org(3) dod(6) internet(1) private(4)
897     enterprise(1) microsoft(311) 20 2 3 }
898
899 -- XXX Work around bug (where we don't know the names of universal types in the
900 -- template backend) by creating aliases for universal types we use in IOS
901 -- objects.
902 AliasUTF8String ::= UTF8String
903 AliasIA5String ::= UTF8String
904 AliasPrintableString ::= PrintableString
905 on-xmppAddr _OTHER-NAME ::= { &id id-pkix-on-xmppAddr, &Type AliasUTF8String }
906 on-dnsSRV _OTHER-NAME ::= { &id id-pkix-on-dnsSRV, &Type AliasIA5String }
907 on-hardwareModuleName _OTHER-NAME ::= {
908     &id id-pkix-on-hardwareModuleName,
909     &Type HardwareModuleName
910 }
911 on-permanentIdentifier _OTHER-NAME ::= {
912     &id id-pkix-on-permanentIdentifier,
913     &Type PermanentIdentifier
914 }
915 on-krb5PrincipalName _OTHER-NAME ::= {
916     &id id-pkix-on-pkinit-san,
917     &Type KRB5PrincipalName
918 }
919 on-pkinit-ms-san _OTHER-NAME ::= {
920     &id id-pkix-on-pkinit-ms-san,
921     &Type AliasUTF8String
922 }
923
924 KnownOtherNameTypes _OTHER-NAME ::= {
925     on-xmppAddr
926   | on-dnsSRV
927   | on-hardwareModuleName
928   | on-permanentIdentifier
929   | on-krb5PrincipalName
930   | on-pkinit-ms-san
931 }
932
933 OtherName ::= OtherName{KnownOtherNameTypes}
934
935 X520name ::= DirectoryString --{ub-name}
936 X520CommonName ::= DirectoryString --{ub-common-name}
937 X520LocalityName ::= DirectoryString --{ub-locality-name}
938 X520OrganizationName ::= DirectoryString --{ub-organization-name}
939 X520StateOrProvinceName ::= DirectoryString --{ub-state-name}
940 X520OrganizationalUnitName ::= DirectoryString --{ub-organizational-unit-name}
941
942 at-name _ATTRIBUTE ::= { &Type X520name, &id id-at-name }
943 at-surname _ATTRIBUTE ::= { &Type X520name, &id id-at-surname }
944 at-givenName _ATTRIBUTE ::= { &Type X520name, &id id-at-givenName }
945 at-initials _ATTRIBUTE ::= { &Type X520name, &id id-at-initials }
946 at-generationQualifier _ATTRIBUTE ::= { &Type X520name, &id id-at-generationQualifier }
947 at-x520CommonName _ATTRIBUTE ::= {&Type X520CommonName, &id id-at-commonName }
948 at-x520LocalityName _ATTRIBUTE ::= { &Type X520LocalityName, &id id-at-localityName }
949 at-x520StateOrProvinceName _ATTRIBUTE ::= { &Type DirectoryString --{ub-state-name}--, &id id-at-stateOrProvinceName }
950 at-x520OrganizationName _ATTRIBUTE ::= { &Type DirectoryString --{ub-organization-name}--, &id id-at-organizationName }
951 at-x520OrganizationalUnitName _ATTRIBUTE ::= { &Type DirectoryString --{ub-organizational-unit-name}--, &id id-at-organizationalUnitName }
952 at-x520Title _ATTRIBUTE ::= { &Type DirectoryString --{ub-title}--, &id id-at-title }
953 at-x520dnQualifier _ATTRIBUTE ::= { &Type AliasPrintableString, &id id-at-dnQualifier }
954 at-x520countryName _ATTRIBUTE ::=  { &Type AliasPrintableString --(SIZE (2))--, &id id-at-countryName }
955 at-x520SerialNumber _ATTRIBUTE ::=  {&Type AliasPrintableString --(SIZE (1..ub-serial-number))--, &id id-at-serialNumber }
956 at-x520Pseudonym _ATTRIBUTE ::= { &Type DirectoryString --{ub-pseudonym}--, &id id-at-pseudonym }
957 at-domainComponent _ATTRIBUTE ::= { &Type AliasIA5String, &id id-domainComponent }
958 at-emailAddress _ATTRIBUTE ::= { &Type AliasIA5String --(SIZE (1..ub-emailaddress-length))--, &id id-at-emailAddress }
959
960 SupportedAttributes _ATTRIBUTE ::= {
961     at-name
962   | at-surname
963   | at-givenName
964   | at-initials
965   | at-generationQualifier
966   | at-x520CommonName
967   | at-x520LocalityName
968   | at-x520StateOrProvinceName
969   | at-x520OrganizationName
970   | at-x520OrganizationalUnitName
971   | at-x520Title
972   | at-x520dnQualifier
973   | at-x520countryName
974   | at-x520SerialNumber
975   | at-x520Pseudonym
976   | at-domainComponent
977   | at-emailAddress
978   | at-TPMSecurityAssertions
979   | at-TPMManufacturer
980   | at-TPMModel
981   | at-TPMVersion
982   | at-TPMSpecification
983 }
984
985 SingleAttribute ::= SingleAttribute{SupportedAttributes}
986 AttributeSet ::= AttributeSet{SupportedAttributes}
987 SubjectDirectoryAttributes ::= SEQUENCE SIZE (1..MAX) OF AttributeSet
988
989 ext-AuthorityKeyIdentifier _EXTENSION ::= {
990     &id id-x509-ce-authorityKeyIdentifier,
991     &Critical FALSE,
992     &ExtnType AuthorityKeyIdentifier
993 }
994 ext-KeyUsage _EXTENSION ::= {
995     &id id-x509-ce-keyUsage,
996     &Critical FALSE,
997     &ExtnType KeyUsage
998 }
999 ext-SubjectKeyIdentifier _EXTENSION ::= {
1000     &id id-x509-ce-subjectKeyIdentifier,
1001     &Critical FALSE,
1002     &ExtnType SubjectKeyIdentifier
1003 }
1004 ext-PrivateKeyUsagePeriod _EXTENSION ::= {
1005     &id id-x509-ce-privateKeyUsagePeriod,
1006     &Critical FALSE,
1007     &ExtnType PrivateKeyUsagePeriod
1008 }
1009 ext-CertificatePolicies _EXTENSION ::= {
1010     &id id-x509-ce-certificatePolicies,
1011     &Critical FALSE,
1012     &ExtnType CertificatePolicies
1013 }
1014 ext-PolicyMappings _EXTENSION ::= {
1015     &id id-x509-ce-policyMappings,
1016     &Critical FALSE,
1017     &ExtnType PolicyMappings
1018 }
1019 ext-SubjectAltName _EXTENSION ::= {
1020     &id id-x509-ce-subjectAltName,
1021     &Critical FALSE,
1022     &ExtnType GeneralNames
1023 }
1024 ext-IssuerAltName _EXTENSION ::= {
1025     &id id-x509-ce-issuerAltName,
1026     &Critical FALSE,
1027     &ExtnType GeneralNames
1028 }
1029 ext-SubjectDirectoryAttributes _EXTENSION ::= {
1030     &id id-x509-ce-subjectDirectoryAttributes,
1031     &Critical FALSE,
1032     &ExtnType SubjectDirectoryAttributes
1033 }
1034 ext-BasicConstraints _EXTENSION ::= {
1035     &id id-x509-ce-basicConstraints,
1036     &Critical FALSE,
1037     &ExtnType BasicConstraints
1038 }
1039 ext-NameConstraints _EXTENSION ::= {
1040     &id id-x509-ce-nameConstraints,
1041     &Critical FALSE,
1042     &ExtnType NameConstraints
1043 }
1044 SkipCerts ::= INTEGER (0..4294967295)
1045 PolicyConstraints ::= SEQUENCE {
1046     requireExplicitPolicy           [0] IMPLICIT SkipCerts OPTIONAL,
1047     inhibitPolicyMapping            [1] IMPLICIT SkipCerts OPTIONAL
1048 }
1049 ext-PolicyConstraints _EXTENSION ::= {
1050     &id id-x509-ce-policyConstraints,
1051     &Critical FALSE,
1052     &ExtnType PolicyConstraints
1053 }
1054 ext-ExtKeyUsage _EXTENSION ::= {
1055     &id id-x509-ce-extKeyUsage,
1056     &Critical FALSE,
1057     &ExtnType ExtKeyUsage
1058 }
1059 ext-CRLDistributionPoints _EXTENSION ::= {
1060     &id id-x509-ce-cRLDistributionPoints,
1061     &Critical FALSE,
1062     &ExtnType CRLDistributionPoints
1063 }
1064 ext-InhibitAnyPolicy _EXTENSION ::= {
1065     &id id-x509-ce-inhibitAnyPolicy,
1066     &Critical FALSE,
1067     &ExtnType SkipCerts
1068 }
1069 ext-FreshestCRL _EXTENSION ::= {
1070     &id id-x509-ce-freshestCRL,
1071     &Critical FALSE,
1072     &ExtnType CRLDistributionPoints
1073 }
1074 ext-AuthorityInfoAccess _EXTENSION ::= {
1075     &id id-pkix-pe-authorityInfoAccess,
1076     &Critical FALSE,
1077     &ExtnType AuthorityInfoAccessSyntax
1078 }
1079 ext-SubjectInfoAccessSyntax _EXTENSION ::= {
1080     &id id-pkix-pe-subjectInfoAccess,
1081     &Critical FALSE,
1082     &ExtnType SubjectInfoAccessSyntax
1083 }
1084 ext-ProxyCertInfo _EXTENSION ::= {
1085     &id id-pkix-pe-proxyCertInfo,
1086     &Critical FALSE,
1087     &ExtnType ProxyCertInfo
1088 }
1089 HeimPkinitPrincMaxLifeSecs ::= INTEGER (0..4294967295)
1090 ext-HeimPkinitPrincMaxLife _EXTENSION ::= {
1091     &id id-heim-ce-pkinit-princ-max-life,
1092     &Critical FALSE,
1093     &ExtnType HeimPkinitPrincMaxLifeSecs
1094 }
1095 CertExtensions _EXTENSION ::= {
1096     ext-AuthorityKeyIdentifier
1097   | ext-SubjectKeyIdentifier
1098   | ext-KeyUsage
1099   | ext-PrivateKeyUsagePeriod
1100   | ext-CertificatePolicies
1101   | ext-PolicyMappings
1102   | ext-SubjectAltName
1103   | ext-IssuerAltName
1104   | ext-SubjectDirectoryAttributes
1105   | ext-BasicConstraints
1106   | ext-NameConstraints
1107   | ext-PolicyConstraints
1108   | ext-ExtKeyUsage
1109   | ext-CRLDistributionPoints
1110   | ext-InhibitAnyPolicy
1111   | ext-FreshestCRL
1112   | ext-AuthorityInfoAccess
1113   | ext-SubjectInfoAccessSyntax
1114   | ext-ProxyCertInfo
1115   | ext-HeimPkinitPrincMaxLife
1116 }
1117
1118 Extension ::= Extension { CertExtensions }
1119
1120 --- U.S. Federal PKI Common Policy Framework
1121 -- Card Authentication key
1122 id-uspkicommon-card-id OBJECT IDENTIFIER ::= { 2 16 840 1 101 3 6 6 }
1123 id-uspkicommon-piv-interim OBJECT IDENTIFIER ::= { 2 16 840 1 101 3 6 9 1 }
1124
1125 --- Netscape extensions
1126
1127 id-netscape OBJECT IDENTIFIER ::=
1128     { joint-iso-itu-t(2) country(16) us(840) organization(1) netscape(113730) }
1129 id-netscape-cert-comment OBJECT IDENTIFIER ::= { id-netscape 1 13 }
1130
1131 --- MS extensions
1132
1133 id-ms-cert-enroll-domaincontroller OBJECT IDENTIFIER ::=
1134     { 1 3 6 1 4 1 311 20 2 }
1135
1136 -- This is a duplicate of id-pkix-kp-clientAuth
1137 --  id-ms-client-authentication OBJECT IDENTIFIER ::=
1138 --  { 1 3 6 1 5 5 7 3 2 }
1139
1140 -- DER:1e:20:00:44:00:6f:00:6d:00:61:00:69:00:6e:00:43:00:6f:00:6e:00:74:00:72:00:6f:00:6c:00:6c:00:65:00:72
1141
1142 -- Upper bounds:
1143
1144 ub-name INTEGER ::= 32768
1145 ub-common-name INTEGER ::= 64
1146 ub-locality-name INTEGER ::= 128
1147 ub-state-name INTEGER ::= 128
1148 ub-organization-name INTEGER ::= 64
1149 ub-organizational-unit-name INTEGER ::= 64
1150 ub-title INTEGER ::= 64
1151 ub-serial-number INTEGER ::= 64
1152 ub-match INTEGER ::= 128
1153 ub-emailaddress-length INTEGER ::= 255
1154 ub-common-name-length INTEGER ::= 64
1155 ub-country-name-alpha-length INTEGER ::= 2
1156 ub-country-name-numeric-length INTEGER ::= 3
1157 ub-domain-defined-attributes INTEGER ::= 4
1158 ub-domain-defined-attribute-type-length INTEGER ::= 8
1159 ub-domain-defined-attribute-value-length INTEGER ::= 128
1160 ub-domain-name-length INTEGER ::= 16
1161 ub-extension-attributes INTEGER ::= 256
1162 ub-e163-4-number-length INTEGER ::= 15
1163 ub-e163-4-sub-address-length INTEGER ::= 40
1164 ub-generation-qualifier-length INTEGER ::= 3
1165 ub-given-name-length INTEGER ::= 16
1166 ub-initials-length INTEGER ::= 5
1167 ub-integer-options INTEGER ::= 256
1168 ub-numeric-user-id-length INTEGER ::= 32
1169 ub-organization-name-length INTEGER ::= 64
1170 ub-organizational-unit-name-length INTEGER ::= 32
1171 ub-organizational-units INTEGER ::= 4
1172 ub-pds-name-length INTEGER ::= 16
1173 ub-pds-parameter-length INTEGER ::= 30
1174 ub-pds-physical-address-lines INTEGER ::= 6
1175 ub-postal-code-length INTEGER ::= 16
1176 ub-pseudonym INTEGER ::= 128
1177 ub-surname-length INTEGER ::= 40
1178 ub-terminal-id-length INTEGER ::= 24
1179 ub-unformatted-address-length INTEGER ::= 180
1180 ub-x121-address-length INTEGER ::= 16
1181
1182 -- Misc OIDs from RFC5280.  We should add related types as well.
1183
1184 -- Policy qualifiers
1185 id-pkix-qt OBJECT IDENTIFIER ::= { id-pkix 2 }
1186 id-pkix-qt-cps      OBJECT IDENTIFIER ::=  { id-pkix-qt 1 }
1187 id-pkix-qt-unotice  OBJECT IDENTIFIER ::=  { id-pkix-qt 2 }
1188
1189 -- Access description
1190 id-pkix-ad OBJECT IDENTIFIER ::= { id-pkix 48 }
1191 id-pkix-ad-ocsp         OBJECT IDENTIFIER ::= { id-pkix-ad 1 }
1192 id-pkix-ad-caIssuers    OBJECT IDENTIFIER ::= { id-pkix-ad 2 }
1193 id-pkix-ad-timeStamping OBJECT IDENTIFIER ::= { id-pkix-ad 3 }
1194 id-pkix-ad-caRepository OBJECT IDENTIFIER ::= { id-pkix-ad 5 }
1195
1196 pq-CPS _POLICYQUALIFIERINFO ::= {
1197     &id id-pkix-qt-cps,
1198     &Type AliasIA5String
1199 }
1200 pq-UserNotice _POLICYQUALIFIERINFO ::= {
1201     &id id-pkix-qt-unotice,
1202     &Type UserNotice
1203 }
1204 KnownPolicyQualifiers _POLICYQUALIFIERINFO ::= {
1205     pq-CPS
1206   | pq-UserNotice
1207 }
1208 PolicyQualifierInfo ::= PolicyQualifierInfo{KnownPolicyQualifiers}
1209
1210 END