optimized _asn1_find_up().
[platform/upstream/libtasn1.git] / examples / pkix.asn
1 -- Copyright (C) 2002-2014 Free Software Foundation, Inc.
2 --
3 -- This file is part of LIBTASN1.
4 --
5 -- This program is free software: you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation, either version 3 of the License, or
8 -- (at your option) any later version.
9 --
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 -- GNU General Public License for more details.
14 --
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
18 PKIX1Implicit88 {iso(1) identified-organization(3) dod(6) internet(1)
19   security(5) mechanisms(5) pkix(7) id-mod(0) id-pkix1-implicit-88(2)}
20
21 DEFINITIONS IMPLICIT TAGS ::=
22
23 BEGIN
24
25 -- ISO arc for standard certificate and CRL extensions
26
27 id-ce OBJECT IDENTIFIER  ::=  {joint-iso-ccitt(2) ds(5) 29}
28
29
30 -- authority key identifier OID and syntax
31
32 id-ce-authorityKeyIdentifier OBJECT IDENTIFIER ::=  { id-ce 35 }
33
34 AuthorityKeyIdentifier ::= SEQUENCE {
35       keyIdentifier             [0] KeyIdentifier            OPTIONAL,
36       authorityCertIssuer       [1] GeneralNames             OPTIONAL,
37       authorityCertSerialNumber [2] CertificateSerialNumber  OPTIONAL }
38     -- authorityCertIssuer and authorityCertSerialNumber shall both
39     -- be present or both be absgent
40
41 KeyIdentifier ::= OCTET STRING
42
43 -- subject key identifier OID and syntax
44
45 id-ce-subjectKeyIdentifier OBJECT IDENTIFIER ::=  { id-ce 14 }
46
47 SubjectKeyIdentifier ::= KeyIdentifier
48
49 -- key usage extension OID and syntax
50
51 id-ce-keyUsage OBJECT IDENTIFIER ::=  { id-ce 15 }
52
53 KeyUsage ::= BIT STRING {
54      digitalSignature        (0),
55      nonRepudiation          (1),
56      keyEncipherment         (2),
57      dataEncipherment        (3),
58      keyAgreement            (4),
59      keyCertSign             (5),
60      cRLSign                 (6),
61      encipherOnly            (7),
62      decipherOnly            (8) }
63
64 -- private key usage period extension OID and syntax
65
66 id-ce-privateKeyUsagePeriod OBJECT IDENTIFIER ::=  { id-ce 16 }
67
68 PrivateKeyUsagePeriod ::= SEQUENCE {
69      notBefore       [0]     GeneralizedTime OPTIONAL,
70      notAfter        [1]     GeneralizedTime OPTIONAL }
71      -- either notBefore or notAfter shall be present
72
73 -- certificate policies extension OID and syntax
74
75 id-ce-certificatePolicies OBJECT IDENTIFIER ::=  { id-ce 32 }
76
77 CertificatePolicies ::= SEQUENCE SIZE (1..MAX) OF PolicyInformation
78
79 PolicyInformation ::= SEQUENCE {
80      policyIdentifier   CertPolicyId,
81      policyQualifiers   SEQUENCE SIZE (1..MAX) OF
82              PolicyQualifierInfo OPTIONAL }
83
84 CertPolicyId ::= OBJECT IDENTIFIER
85
86 PolicyQualifierInfo ::= SEQUENCE {
87        policyQualifierId  PolicyQualifierId,
88        qualifier        ANY DEFINED BY policyQualifierId }
89
90 -- Implementations that recognize additional policy qualifiers shall
91 -- augment the following definition for PolicyQualifierId
92
93 PolicyQualifierId ::=
94     OBJECT IDENTIFIER  -- ( id-qt-cps | id-qt-unotice )
95
96 -- CPS pointer qualifier
97
98 CPSuri ::= IA5String
99
100 -- user notice qualifier
101
102 UserNotice ::= SEQUENCE {
103      noticeRef        NoticeReference OPTIONAL,
104      explicitText     DisplayText OPTIONAL}
105
106 NoticeReference ::= SEQUENCE {
107      organization     DisplayText,
108      noticeNumbers    SEQUENCE OF INTEGER }
109
110 DisplayText ::= CHOICE {
111      visibleString    VisibleString  (SIZE (1..200)),
112      bmpString        BMPString      (SIZE (1..200)),
113      utf8String       UTF8String     (SIZE (1..200)) }
114
115 -- policy mapping extension OID and syntax
116
117 id-ce-policyMappings OBJECT IDENTIFIER ::=  { id-ce 33 }
118
119 PolicyMappings ::= SEQUENCE SIZE (1..MAX) OF SEQUENCE {
120      issuerDomainPolicy      CertPolicyId,
121      subjectDomainPolicy     CertPolicyId }
122
123 -- subject alternative name extension OID and syntax
124
125 id-ce-subjectAltName OBJECT IDENTIFIER ::=  { id-ce 17 }
126
127 SubjectAltName ::= GeneralNames
128
129 GeneralNames ::= SEQUENCE SIZE (1..MAX) OF GeneralName
130
131 GeneralName ::= CHOICE {
132      otherName                       [0]     AnotherName,
133      rfc822Name                      [1]     IA5String,
134      dNSName                         [2]     IA5String,
135      x400Address                     [3]     ORAddress,
136      directoryName                   [4]     Name,
137      ediPartyName                    [5]     EDIPartyName,
138      uniformResourceIdentifier       [6]     IA5String,
139      iPAddress                       [7]     OCTET STRING,
140      registeredID                    [8]     OBJECT IDENTIFIER }
141
142 -- AnotherName replaces OTHER-NAME ::= TYPE-IDENTIFIER, as
143 -- TYPE-IDENTIFIER is not supported in the '88 ASN.1 syntax
144
145 AnotherName ::= SEQUENCE {
146      type-id    OBJECT IDENTIFIER,
147      value      [0] EXPLICIT ANY DEFINED BY type-id }
148
149 EDIPartyName ::= SEQUENCE {
150      nameAssigner            [0]     DirectoryString OPTIONAL,
151      partyName               [1]     DirectoryString }
152
153 -- issuer alternative name extension OID and syntax
154
155 id-ce-issuerAltName OBJECT IDENTIFIER ::=  { id-ce 18 }
156
157 IssuerAltName ::= GeneralNames
158
159 id-ce-subjectDirectoryAttributes OBJECT IDENTIFIER ::=  { id-ce 9 }
160
161 SubjectDirectoryAttributes ::= SEQUENCE SIZE (1..MAX) OF Attribute
162
163 -- basic constraints extension OID and syntax
164
165 id-ce-basicConstraints OBJECT IDENTIFIER ::=  { id-ce 19 }
166
167 BasicConstraints ::= SEQUENCE {
168      cA                      BOOLEAN DEFAULT FALSE,
169      pathLenConstraint       INTEGER (0..MAX) OPTIONAL }
170
171 -- name constraints extension OID and syntax
172
173 id-ce-nameConstraints OBJECT IDENTIFIER ::=  { id-ce 30 }
174
175 NameConstraints ::= SEQUENCE {
176      permittedSubtrees       [0]     GeneralSubtrees OPTIONAL,
177      excludedSubtrees        [1]     GeneralSubtrees OPTIONAL }
178
179 GeneralSubtrees ::= SEQUENCE SIZE (1..MAX) OF GeneralSubtree
180
181 GeneralSubtree ::= SEQUENCE {
182      base                    GeneralName,
183      minimum         [0]     BaseDistance DEFAULT 0,
184      maximum         [1]     BaseDistance OPTIONAL }
185
186 BaseDistance ::= INTEGER (0..MAX)
187
188 -- policy constraints extension OID and syntax
189
190 id-ce-policyConstraints OBJECT IDENTIFIER ::=  { id-ce 36 }
191
192 PolicyConstraints ::= SEQUENCE {
193      requireExplicitPolicy           [0] SkipCerts OPTIONAL,
194      inhibitPolicyMapping            [1] SkipCerts OPTIONAL }
195
196 SkipCerts ::= INTEGER (0..MAX)
197
198 -- CRL distribution points extension OID and syntax
199
200 id-ce-cRLDistributionPoints     OBJECT IDENTIFIER  ::=  {id-ce 31}
201
202 CRLDistPointsSyntax ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint
203
204 DistributionPoint ::= SEQUENCE {
205      distributionPoint       [0]     DistributionPointName OPTIONAL,
206      reasons                 [1]     ReasonFlags OPTIONAL,
207      cRLIssuer               [2]     GeneralNames OPTIONAL }
208
209 DistributionPointName ::= CHOICE {
210      fullName                [0]     GeneralNames,
211      nameRelativeToCRLIssuer [1]     RelativeDistinguishedName }
212
213
214
215 ReasonFlags ::= BIT STRING {
216      unused                  (0),
217      keyCompromise           (1),
218      cACompromise            (2),
219      affiliationChanged      (3),
220      superseded              (4),
221      cessationOfOperation    (5),
222      certificateHold         (6) }
223
224 -- extended key usage extension OID and syntax
225
226 id-ce-extKeyUsage OBJECT IDENTIFIER ::= {id-ce 37}
227
228 ExtKeyUsageSyntax ::= SEQUENCE SIZE (1..MAX) OF KeyPurposeId
229
230 KeyPurposeId ::= OBJECT IDENTIFIER
231
232 -- extended key purpose OIDs
233 id-kp-serverAuth      OBJECT IDENTIFIER ::= { id-kp 1 }
234 id-kp-clientAuth      OBJECT IDENTIFIER ::= { id-kp 2 }
235 id-kp-codeSigning     OBJECT IDENTIFIER ::= { id-kp 3 }
236 id-kp-emailProtection OBJECT IDENTIFIER ::= { id-kp 4 }
237 id-kp-ipsecEndSystem  OBJECT IDENTIFIER ::= { id-kp 5 }
238 id-kp-ipsecTunnel     OBJECT IDENTIFIER ::= { id-kp 6 }
239 id-kp-ipsecUser       OBJECT IDENTIFIER ::= { id-kp 7 }
240 id-kp-timeStamping    OBJECT IDENTIFIER ::= { id-kp 8 }
241
242 -- authority info access
243
244 id-pe-authorityInfoAccess OBJECT IDENTIFIER ::= { id-pe 1 }
245
246 AuthorityInfoAccessSyntax  ::=
247         SEQUENCE SIZE (1..MAX) OF AccessDescription
248
249 AccessDescription  ::=  SEQUENCE {
250         accessMethod          OBJECT IDENTIFIER,
251         accessLocation        GeneralName  }
252
253 -- CRL number extension OID and syntax
254
255 id-ce-cRLNumber OBJECT IDENTIFIER ::= { id-ce 20 }
256
257 CRLNumber ::= INTEGER (0..MAX)
258
259 -- issuing distribution point extension OID and syntax
260
261 id-ce-issuingDistributionPoint OBJECT IDENTIFIER ::= { id-ce 28 }
262
263 IssuingDistributionPoint ::= SEQUENCE {
264      distributionPoint       [0] DistributionPointName OPTIONAL,
265      onlyContainsUserCerts   [1] BOOLEAN DEFAULT FALSE,
266      onlyContainsCACerts     [2] BOOLEAN DEFAULT FALSE,
267      onlySomeReasons         [3] ReasonFlags OPTIONAL,
268      indirectCRL             [4] BOOLEAN DEFAULT FALSE }
269
270
271 id-ce-deltaCRLIndicator OBJECT IDENTIFIER ::= { id-ce 27 }
272
273 -- deltaCRLIndicator ::= BaseCRLNumber
274
275 BaseCRLNumber ::= CRLNumber
276
277 -- CRL reasons extension OID and syntax
278
279 id-ce-cRLReasons OBJECT IDENTIFIER ::= { id-ce 21 }
280
281 CRLReason ::= ENUMERATED {
282      unspecified             (0),
283      keyCompromise           (1),
284      cACompromise            (2),
285      affiliationChanged      (3),
286      superseded              (4),
287      cessationOfOperation    (5),
288      certificateHold         (6),
289      removeFromCRL           (8) }
290
291 -- certificate issuer CRL entry extension OID and syntax
292
293 id-ce-certificateIssuer OBJECT IDENTIFIER ::= { id-ce 29 }
294
295 CertificateIssuer ::= GeneralNames
296
297 -- hold instruction extension OID and syntax
298
299 id-ce-holdInstructionCode OBJECT IDENTIFIER ::= { id-ce 23 }
300
301 HoldInstructionCode ::= OBJECT IDENTIFIER
302
303 -- ANSI x9 holdinstructions
304
305 -- ANSI x9 arc holdinstruction arc
306 holdInstruction OBJECT IDENTIFIER ::=
307           {joint-iso-itu-t(2) member-body(2) us(840) x9cm(10040) 2}
308
309 -- ANSI X9 holdinstructions referenced by this standard
310 id-holdinstruction-none OBJECT IDENTIFIER  ::=
311                 {holdInstruction 1} -- deprecated
312 id-holdinstruction-callissuer OBJECT IDENTIFIER ::=
313                 {holdInstruction 2}
314 id-holdinstruction-reject OBJECT IDENTIFIER ::=
315                 {holdInstruction 3}
316
317 -- invalidity date CRL entry extension OID and syntax
318
319 id-ce-invalidityDate OBJECT IDENTIFIER ::= { id-ce 24 }
320
321 InvalidityDate ::=  GeneralizedTime
322
323
324 -- --------------------------------------
325 --  EXPLICIT
326 -- --------------------------------------
327
328 -- UNIVERSAL Types defined in '93 and '98 ASN.1
329 -- but required by this specification
330
331 VisibleString ::= [UNIVERSAL 26] IMPLICIT OCTET STRING
332
333 NumericString ::= [UNIVERSAL 18] IMPLICIT OCTET STRING
334
335 IA5String ::= [UNIVERSAL 22] IMPLICIT OCTET STRING
336
337 TeletexString ::= [UNIVERSAL 20] IMPLICIT OCTET STRING
338
339 PrintableString ::= [UNIVERSAL 19] IMPLICIT OCTET STRING
340
341 UniversalString ::= [UNIVERSAL 28] IMPLICIT OCTET STRING
342         -- UniversalString is defined in ASN.1:1993
343
344 BMPString ::= [UNIVERSAL 30] IMPLICIT OCTET STRING
345       -- BMPString is the subtype of UniversalString and models
346        -- the Basic Multilingual Plane of ISO/IEC/ITU 10646-1
347
348 UTF8String ::= [UNIVERSAL 12] IMPLICIT OCTET STRING
349         -- The content of this type conforms to RFC 2279.
350
351
352 -- PKIX specific OIDs
353
354 id-pkix  OBJECT IDENTIFIER  ::=
355          { iso(1) identified-organization(3) dod(6) internet(1)
356                     security(5) mechanisms(5) pkix(7) }
357
358 -- PKIX arcs
359
360 id-pe OBJECT IDENTIFIER  ::=  { id-pkix 1 }
361         -- arc for private certificate extensions
362 id-qt OBJECT IDENTIFIER ::= { id-pkix 2 }
363         -- arc for policy qualifier types
364 id-kp OBJECT IDENTIFIER ::= { id-pkix 3 }
365         -- arc for extended key purpose OIDS
366 id-ad OBJECT IDENTIFIER ::= { id-pkix 48 }
367         -- arc for access descriptors
368
369 -- policyQualifierIds for Internet policy qualifiers
370
371 id-qt-cps      OBJECT IDENTIFIER ::=  { id-qt 1 }
372         -- OID for CPS qualifier
373 id-qt-unotice  OBJECT IDENTIFIER ::=  { id-qt 2 }
374         -- OID for user notice qualifier
375
376 -- access descriptor definitions
377
378 id-ad-ocsp      OBJECT IDENTIFIER ::= { id-ad 1 }
379 id-ad-caIssuers OBJECT IDENTIFIER ::= { id-ad 2 }
380
381 -- attribute data types --
382
383 Attribute       ::=     SEQUENCE {
384         type            AttributeType,
385         values  SET OF AttributeValue
386                 -- at least one value is required --
387 }
388
389 AttributeType           ::=   OBJECT IDENTIFIER
390
391 AttributeValue          ::=   ANY
392
393 AttributeTypeAndValue           ::=     SEQUENCE {
394         type    AttributeType,
395         value   AttributeValue }
396
397 -- suggested naming attributes: Definition of the following
398 --  information object set may be augmented to meet local
399 --  requirements.  Note that deleting members of the set may
400 --  prevent interoperability with conforming implementations.
401 --  presented in pairs: the AttributeType followed by the
402 --  type definition for the corresponding AttributeValue
403
404 -- Arc for standard naming attributes
405 id-at           OBJECT IDENTIFIER ::= {joint-iso-ccitt(2) ds(5) 4}
406
407 -- Attributes of type NameDirectoryString
408 id-at-name              AttributeType   ::=     {id-at 41}
409 id-at-surname           AttributeType   ::=     {id-at 4}
410 id-at-givenName         AttributeType   ::=     {id-at 42}
411 id-at-initials          AttributeType   ::=     {id-at 43}
412 id-at-generationQualifier       AttributeType   ::=     {id-at 44}
413
414 X520name        ::= CHOICE {
415       teletexString         TeletexString (SIZE (1..ub-name)),
416       printableString       PrintableString (SIZE (1..ub-name)),
417       universalString       UniversalString (SIZE (1..ub-name)),
418       utf8String            UTF8String (SIZE (1..ub-name)),
419       bmpString             BMPString (SIZE(1..ub-name))   }
420
421 --
422
423 id-at-commonName        AttributeType   ::=     {id-at 3}
424
425 X520CommonName  ::=      CHOICE {
426       teletexString         TeletexString (SIZE (1..ub-common-name)),
427       printableString       PrintableString (SIZE (1..ub-common-name)),
428       universalString       UniversalString (SIZE (1..ub-common-name)),
429       utf8String            UTF8String (SIZE (1..ub-common-name)),
430       bmpString             BMPString (SIZE(1..ub-common-name))   }
431
432 --
433
434 id-at-localityName      AttributeType   ::=     {id-at 7}
435
436 X520LocalityName ::= CHOICE {
437       teletexString       TeletexString (SIZE (1..ub-locality-name)),
438       printableString     PrintableString (SIZE (1..ub-locality-name)),
439       universalString     UniversalString (SIZE (1..ub-locality-name)),
440       utf8String          UTF8String (SIZE (1..ub-locality-name)),
441       bmpString           BMPString (SIZE(1..ub-locality-name))   }
442
443 --
444
445 id-at-stateOrProvinceName       AttributeType   ::=     {id-at 8}
446
447 X520StateOrProvinceName         ::= CHOICE {
448       teletexString       TeletexString (SIZE (1..ub-state-name)),
449       printableString     PrintableString (SIZE (1..ub-state-name)),
450       universalString     UniversalString (SIZE (1..ub-state-name)),
451       utf8String          UTF8String (SIZE (1..ub-state-name)),
452       bmpString           BMPString (SIZE(1..ub-state-name))   }
453
454 --
455
456 id-at-organizationName          AttributeType   ::=     {id-at 10}
457
458 X520OrganizationName ::= CHOICE {
459   teletexString     TeletexString (SIZE (1..ub-organization-name)),
460   printableString   PrintableString (SIZE (1..ub-organization-name)),
461   universalString   UniversalString (SIZE (1..ub-organization-name)),
462   utf8String        UTF8String (SIZE (1..ub-organization-name)),
463   bmpString         BMPString (SIZE(1..ub-organization-name))   }
464
465 --
466
467 id-at-organizationalUnitName    AttributeType   ::=     {id-at 11}
468
469 X520OrganizationalUnitName ::= CHOICE {
470  teletexString    TeletexString (SIZE (1..ub-organizational-unit-name)),
471  printableString        PrintableString
472                       (SIZE (1..ub-organizational-unit-name)),
473  universalString        UniversalString
474                       (SIZE (1..ub-organizational-unit-name)),
475  utf8String       UTF8String (SIZE (1..ub-organizational-unit-name)),
476  bmpString        BMPString (SIZE(1..ub-organizational-unit-name))   }
477
478 --
479
480 id-at-title     AttributeType   ::=     {id-at 12}
481
482 X520Title ::=   CHOICE {
483       teletexString         TeletexString (SIZE (1..ub-title)),
484       printableString       PrintableString (SIZE (1..ub-title)),
485       universalString       UniversalString (SIZE (1..ub-title)),
486       utf8String            UTF8String (SIZE (1..ub-title)),
487       bmpString             BMPString (SIZE(1..ub-title))   }
488
489 --
490
491 id-at-dnQualifier       AttributeType   ::=     {id-at 46}
492 X520dnQualifier ::=     PrintableString
493
494 id-at-countryName       AttributeType   ::=     {id-at 6}
495 X520countryName ::=     PrintableString (SIZE (2)) -- IS 3166 codes
496
497  -- Legacy attributes
498
499 pkcs-9 OBJECT IDENTIFIER ::=
500        { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 9 }
501
502 emailAddress AttributeType      ::= { pkcs-9 1 }
503
504 Pkcs9email ::= IA5String (SIZE (1..ub-emailaddress-length))
505
506 -- naming data types --
507
508 Name            ::=   CHOICE { -- only one possibility for now --
509                                  rdnSequence  RDNSequence }
510
511 RDNSequence     ::=   SEQUENCE OF RelativeDistinguishedName
512
513 DistinguishedName       ::=   RDNSequence
514
515 RelativeDistinguishedName  ::=
516                     SET SIZE (1 .. MAX) OF AttributeTypeAndValue
517
518 -- Directory string type --
519
520 DirectoryString ::= CHOICE {
521       teletexString             TeletexString (SIZE (1..MAX)),
522       printableString           PrintableString (SIZE (1..MAX)),
523       universalString           UniversalString (SIZE (1..MAX)),
524       utf8String              UTF8String (SIZE (1..MAX)),
525       bmpString               BMPString (SIZE(1..MAX))   }
526
527
528 -- --------------------------------------------------------
529 -- certificate and CRL specific structures begin here
530 -- --------------------------------------------------------
531
532 Certificate  ::=  SEQUENCE  {
533      tbsCertificate       TBSCertificate,
534      signatureAlgorithm   AlgorithmIdentifier,
535      signature            BIT STRING  }
536
537 TBSCertificate  ::=  SEQUENCE  {
538      version         [0]  EXPLICIT Version DEFAULT v1,
539      serialNumber         CertificateSerialNumber,
540      signature            AlgorithmIdentifier,
541      issuer               Name,
542      validity             Validity,
543      subject              Name,
544      subjectPublicKeyInfo SubjectPublicKeyInfo,
545      issuerUniqueID  [1]  IMPLICIT UniqueIdentifier OPTIONAL,
546                           -- If present, version shall be v2 or v3
547      subjectUniqueID [2]  IMPLICIT UniqueIdentifier OPTIONAL,
548                           -- If present, version shall be v2 or v3
549      extensions      [3]  EXPLICIT Extensions OPTIONAL
550                           -- If present, version shall be v3 --
551 }
552
553 Version  ::=  INTEGER  {  v1(0), v2(1), v3(2)  }
554
555 CertificateSerialNumber  ::=  INTEGER
556
557 Validity ::= SEQUENCE {
558      notBefore      Time,
559      notAfter       Time }
560
561 Time ::= CHOICE {
562      utcTime        UTCTime,
563      generalTime    GeneralizedTime }
564
565 UniqueIdentifier  ::=  BIT STRING
566
567 SubjectPublicKeyInfo  ::=  SEQUENCE  {
568      algorithm            AlgorithmIdentifier,
569      subjectPublicKey     BIT STRING  }
570
571 Extensions  ::=  SEQUENCE SIZE (1..MAX) OF Extension
572
573 Extension  ::=  SEQUENCE  {
574      extnID      OBJECT IDENTIFIER,
575      critical    BOOLEAN DEFAULT FALSE,
576      extnValue   OCTET STRING  }
577
578
579 -- ------------------------------------------
580 -- CRL structures
581 -- ------------------------------------------
582
583 CertificateList  ::=  SEQUENCE  {
584      tbsCertList          TBSCertList,
585      signatureAlgorithm   AlgorithmIdentifier,
586      signature            BIT STRING  }
587
588 TBSCertList  ::=  SEQUENCE  {
589      version                 Version OPTIONAL,
590                                   -- if present, shall be v2
591      signature               AlgorithmIdentifier,
592      issuer                  Name,
593      thisUpdate              Time,
594      nextUpdate              Time OPTIONAL,
595      revokedCertificates     SEQUENCE OF SEQUENCE  {
596           userCertificate         CertificateSerialNumber,
597           revocationDate          Time,
598           crlEntryExtensions      Extensions OPTIONAL
599                                          -- if present, shall be v2
600                                }  OPTIONAL,
601      crlExtensions           [0] EXPLICIT Extensions OPTIONAL
602                                          -- if present, shall be v2 --
603 }
604
605 -- Version, Time, CertificateSerialNumber, and Extensions were
606 -- defined earlier for use in the certificate structure
607
608 AlgorithmIdentifier  ::=  SEQUENCE  {
609      algorithm               OBJECT IDENTIFIER,
610      parameters              ANY DEFINED BY algorithm OPTIONAL  }
611                                 -- contains a value of the type
612                                 -- registered for use with the
613                                 -- algorithm object identifier value
614
615 -- Algorithm OIDs and parameter structures
616
617 pkcs-1 OBJECT IDENTIFIER ::= {
618      iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 1 }
619
620 rsaEncryption OBJECT IDENTIFIER ::=  { pkcs-1 1 }
621
622 md2WithRSAEncryption OBJECT IDENTIFIER  ::=  { pkcs-1 2 }
623
624 md5WithRSAEncryption OBJECT IDENTIFIER  ::=  { pkcs-1 4 }
625
626 sha1WithRSAEncryption OBJECT IDENTIFIER  ::=  { pkcs-1 5 }
627
628 id-dsa-with-sha1 OBJECT IDENTIFIER ::=  {
629      iso(1) member-body(2) us(840) x9-57 (10040) x9algorithm(4) 3 }
630
631 Dss-Sig-Value  ::=  SEQUENCE  {
632      r       INTEGER,
633      s       INTEGER  }
634
635 dhpublicnumber OBJECT IDENTIFIER ::= {
636      iso(1) member-body(2) us(840) ansi-x942(10046) number-type(2) 1 }
637
638 DomainParameters ::= SEQUENCE {
639      p       INTEGER, -- odd prime, p=jq +1
640      g       INTEGER, -- generator, g
641      q       INTEGER, -- factor of p-1
642      j       INTEGER OPTIONAL, -- subgroup factor, j>= 2
643      validationParms  ValidationParms OPTIONAL }
644
645 ValidationParms ::= SEQUENCE {
646      seed             BIT STRING,
647      pgenCounter      INTEGER }
648
649 id-dsa OBJECT IDENTIFIER ::= {
650      iso(1) member-body(2) us(840) x9-57(10040) x9algorithm(4) 1 }
651
652 Dss-Parms  ::=  SEQUENCE  {
653      p             INTEGER,
654      q             INTEGER,
655      g             INTEGER  }
656
657 -- x400 address syntax starts here
658 --      OR Names
659
660 ORAddress ::= SEQUENCE {
661    built-in-standard-attributes BuiltInStandardAttributes,
662    built-in-domain-defined-attributes
663                         BuiltInDomainDefinedAttributes OPTIONAL,
664    -- see also teletex-domain-defined-attributes
665    extension-attributes ExtensionAttributes OPTIONAL }
666 --      The OR-address is semantically absent from the OR-name if the
667 --      built-in-standard-attribute sequence is empty and the
668 --      built-in-domain-defined-attributes and extension-attributes are
669 --      both omitted.
670
671 --      Built-in Standard Attributes
672
673 BuiltInStandardAttributes ::= SEQUENCE {
674    country-name CountryName OPTIONAL,
675    administration-domain-name AdministrationDomainName OPTIONAL,
676    network-address      [0] EXPLICIT NetworkAddress OPTIONAL,
677    -- see also extended-network-address
678    terminal-identifier  [1] EXPLICIT TerminalIdentifier OPTIONAL,
679    private-domain-name  [2] EXPLICIT PrivateDomainName OPTIONAL,
680    organization-name    [3] EXPLICIT OrganizationName OPTIONAL,
681    -- see also teletex-organization-name
682    numeric-user-identifier      [4] EXPLICIT NumericUserIdentifier OPTIONAL,
683    personal-name        [5] EXPLICIT PersonalName OPTIONAL,
684    -- see also teletex-personal-name
685    organizational-unit-names    [6] EXPLICIT OrganizationalUnitNames OPTIONAL
686    -- see also teletex-organizational-unit-names --
687 }
688
689 CountryName ::= [APPLICATION 1] CHOICE {
690    x121-dcc-code NumericString
691                 (SIZE (ub-country-name-numeric-length)),
692    iso-3166-alpha2-code PrintableString
693                 (SIZE (ub-country-name-alpha-length)) }
694
695 AdministrationDomainName ::= [APPLICATION 2] EXPLICIT CHOICE {
696    numeric NumericString (SIZE (0..ub-domain-name-length)),
697    printable PrintableString (SIZE (0..ub-domain-name-length)) }
698
699 NetworkAddress ::= X121Address  -- see also extended-network-address
700
701 X121Address ::= NumericString (SIZE (1..ub-x121-address-length))
702
703 TerminalIdentifier ::= PrintableString (SIZE (1..ub-terminal-id-length))
704
705 PrivateDomainName ::= CHOICE {
706    numeric NumericString (SIZE (1..ub-domain-name-length)),
707    printable PrintableString (SIZE (1..ub-domain-name-length)) }
708
709 OrganizationName ::= PrintableString
710                             (SIZE (1..ub-organization-name-length))
711 -- see also teletex-organization-name
712
713 NumericUserIdentifier ::= NumericString
714                             (SIZE (1..ub-numeric-user-id-length))
715
716 PersonalName ::= SET {
717    surname [0] PrintableString (SIZE (1..ub-surname-length)),
718    given-name [1] PrintableString
719                         (SIZE (1..ub-given-name-length)) OPTIONAL,
720    initials [2] PrintableString (SIZE (1..ub-initials-length)) OPTIONAL,
721    generation-qualifier [3] PrintableString
722                 (SIZE (1..ub-generation-qualifier-length)) OPTIONAL }
723 -- see also teletex-personal-name
724
725 OrganizationalUnitNames ::= SEQUENCE SIZE (1..ub-organizational-units)
726                                         OF OrganizationalUnitName
727 -- see also teletex-organizational-unit-names
728
729 OrganizationalUnitName ::= PrintableString (SIZE
730                         (1..ub-organizational-unit-name-length))
731
732 --      Built-in Domain-defined Attributes
733
734 BuiltInDomainDefinedAttributes ::= SEQUENCE SIZE
735                                 (1..ub-domain-defined-attributes) OF
736                                 BuiltInDomainDefinedAttribute
737
738 BuiltInDomainDefinedAttribute ::= SEQUENCE {
739    type PrintableString (SIZE
740                         (1..ub-domain-defined-attribute-type-length)),
741    value PrintableString (SIZE
742                         (1..ub-domain-defined-attribute-value-length))}
743
744 --      Extension Attributes
745
746 ExtensionAttributes ::= SET SIZE (1..ub-extension-attributes) OF
747                         ExtensionAttribute
748
749 ExtensionAttribute ::=  SEQUENCE {
750    extension-attribute-type [0] EXPLICIT INTEGER (0..ub-extension-attributes),
751    extension-attribute-value [1] EXPLICIT
752                         ANY DEFINED BY extension-attribute-type }
753
754 -- Extension types and attribute values
755 --
756
757 common-name INTEGER ::= 1
758
759 CommonName ::= PrintableString (SIZE (1..ub-common-name-length))
760
761 teletex-common-name INTEGER ::= 2
762
763 TeletexCommonName ::= TeletexString (SIZE (1..ub-common-name-length))
764
765 teletex-organization-name INTEGER ::= 3
766
767 TeletexOrganizationName ::=
768                 TeletexString (SIZE (1..ub-organization-name-length))
769
770 teletex-personal-name INTEGER ::= 4
771
772 TeletexPersonalName ::= SET {
773    surname [0] EXPLICIT TeletexString (SIZE (1..ub-surname-length)),
774    given-name [1] EXPLICIT TeletexString
775                 (SIZE (1..ub-given-name-length)) OPTIONAL,
776    initials [2] EXPLICIT TeletexString (SIZE (1..ub-initials-length)) OPTIONAL,
777    generation-qualifier [3] EXPLICIT TeletexString (SIZE
778                 (1..ub-generation-qualifier-length)) OPTIONAL }
779
780 teletex-organizational-unit-names INTEGER ::= 5
781
782 TeletexOrganizationalUnitNames ::= SEQUENCE SIZE
783         (1..ub-organizational-units) OF TeletexOrganizationalUnitName
784
785 TeletexOrganizationalUnitName ::= TeletexString
786                         (SIZE (1..ub-organizational-unit-name-length))
787
788 pds-name INTEGER ::= 7
789
790 PDSName ::= PrintableString (SIZE (1..ub-pds-name-length))
791
792 physical-delivery-country-name INTEGER ::= 8
793
794 PhysicalDeliveryCountryName ::= CHOICE {
795    x121-dcc-code NumericString (SIZE (ub-country-name-numeric-length)),
796    iso-3166-alpha2-code PrintableString
797                         (SIZE (ub-country-name-alpha-length)) }
798
799 postal-code INTEGER ::= 9
800
801 PostalCode ::= CHOICE {
802    numeric-code NumericString (SIZE (1..ub-postal-code-length)),
803    printable-code PrintableString (SIZE (1..ub-postal-code-length)) }
804
805 physical-delivery-office-name INTEGER ::= 10
806
807 PhysicalDeliveryOfficeName ::= PDSParameter
808
809 physical-delivery-office-number INTEGER ::= 11
810
811 PhysicalDeliveryOfficeNumber ::= PDSParameter
812
813 extension-OR-address-components INTEGER ::= 12
814
815 ExtensionORAddressComponents ::= PDSParameter
816
817 physical-delivery-personal-name INTEGER ::= 13
818
819 PhysicalDeliveryPersonalName ::= PDSParameter
820
821 physical-delivery-organization-name INTEGER ::= 14
822
823 PhysicalDeliveryOrganizationName ::= PDSParameter
824
825 extension-physical-delivery-address-components INTEGER ::= 15
826
827 ExtensionPhysicalDeliveryAddressComponents ::= PDSParameter
828
829 unformatted-postal-address INTEGER ::= 16
830
831 UnformattedPostalAddress ::= SET {
832    printable-address SEQUENCE SIZE (1..ub-pds-physical-address-lines) OF
833            PrintableString (SIZE (1..ub-pds-parameter-length)) OPTIONAL,
834    teletex-string TeletexString
835          (SIZE (1..ub-unformatted-address-length)) OPTIONAL }
836
837 street-address INTEGER ::= 17
838
839 StreetAddress ::= PDSParameter
840
841 post-office-box-address INTEGER ::= 18
842
843 PostOfficeBoxAddress ::= PDSParameter
844
845 poste-restante-address INTEGER ::= 19
846
847 PosteRestanteAddress ::= PDSParameter
848
849 unique-postal-name INTEGER ::= 20
850
851 UniquePostalName ::= PDSParameter
852
853 local-postal-attributes INTEGER ::= 21
854
855 LocalPostalAttributes ::= PDSParameter
856
857 PDSParameter ::= SET {
858    printable-string PrintableString
859                 (SIZE(1..ub-pds-parameter-length)) OPTIONAL,
860    teletex-string TeletexString
861                 (SIZE(1..ub-pds-parameter-length)) OPTIONAL }
862
863 extended-network-address INTEGER ::= 22
864
865 ExtendedNetworkAddress ::= CHOICE {
866    e163-4-address SEQUENCE {
867         number [0] EXPLICIT NumericString (SIZE (1..ub-e163-4-number-length)),
868         sub-address [1] EXPLICIT NumericString
869                 (SIZE (1..ub-e163-4-sub-address-length)) OPTIONAL },
870    psap-address [0] EXPLICIT PresentationAddress }
871
872 PresentationAddress ::= SEQUENCE {
873         pSelector       [0] EXPLICIT OCTET STRING OPTIONAL,
874         sSelector       [1] EXPLICIT OCTET STRING OPTIONAL,
875         tSelector       [2] EXPLICIT OCTET STRING OPTIONAL,
876         nAddresses      [3] EXPLICIT SET SIZE (1..MAX) OF OCTET STRING }
877
878 terminal-type  INTEGER ::= 23
879
880 TerminalType ::= INTEGER {
881    telex (3),
882    teletex (4),
883    g3-facsimile (5),
884    g4-facsimile (6),
885    ia5-terminal (7),
886    videotex (8) } (0..ub-integer-options)
887
888 --      Extension Domain-defined Attributes
889
890 teletex-domain-defined-attributes INTEGER ::= 6
891
892 TeletexDomainDefinedAttributes ::= SEQUENCE SIZE
893    (1..ub-domain-defined-attributes) OF TeletexDomainDefinedAttribute
894
895 TeletexDomainDefinedAttribute ::= SEQUENCE {
896         type TeletexString
897                (SIZE (1..ub-domain-defined-attribute-type-length)),
898         value TeletexString
899                (SIZE (1..ub-domain-defined-attribute-value-length)) }
900
901 --  specifications of Upper Bounds shall be regarded as mandatory
902 --  from Annex B of ITU-T X.411 Reference Definition of MTS Parameter
903 --  Upper Bounds
904
905 --      Upper Bounds
906 ub-name INTEGER ::=     32768
907 ub-common-name  INTEGER ::=     64
908 ub-locality-name        INTEGER ::=     128
909 ub-state-name   INTEGER ::=     128
910 ub-organization-name    INTEGER ::=     64
911 ub-organizational-unit-name     INTEGER ::=     64
912 ub-title        INTEGER ::=     64
913 ub-match        INTEGER ::=     128
914
915 ub-emailaddress-length INTEGER ::= 128
916
917 ub-common-name-length INTEGER ::= 64
918 ub-country-name-alpha-length INTEGER ::= 2
919 ub-country-name-numeric-length INTEGER ::= 3
920 ub-domain-defined-attributes INTEGER ::= 4
921 ub-domain-defined-attribute-type-length INTEGER ::= 8
922 ub-domain-defined-attribute-value-length INTEGER ::= 128
923 ub-domain-name-length INTEGER ::= 16
924 ub-extension-attributes INTEGER ::= 256
925 ub-e163-4-number-length INTEGER ::= 15
926 ub-e163-4-sub-address-length INTEGER ::= 40
927 ub-generation-qualifier-length INTEGER ::= 3
928 ub-given-name-length INTEGER ::= 16
929 ub-initials-length INTEGER ::= 5
930 ub-integer-options INTEGER ::= 256
931 ub-numeric-user-id-length INTEGER ::= 32
932 ub-organization-name-length INTEGER ::= 64
933 ub-organizational-unit-name-length INTEGER ::= 32
934 ub-organizational-units INTEGER ::= 4
935 ub-pds-name-length INTEGER ::= 16
936 ub-pds-parameter-length INTEGER ::= 30
937 ub-pds-physical-address-lines INTEGER ::= 6
938 ub-postal-code-length INTEGER ::= 16
939 ub-surname-length INTEGER ::= 40
940 ub-terminal-id-length INTEGER ::= 24
941 ub-unformatted-address-length INTEGER ::= 180
942 ub-x121-address-length INTEGER ::= 16
943
944 -- Note - upper bounds on string types, such as TeletexString, are
945 -- measured in characters.  Excepting PrintableString or IA5String, a
946 -- significantly greater number of octets will be required to hold
947 -- such a value.  As a minimum, 16 octets, or twice the specified upper
948 -- bound, whichever is the larger, should be allowed for TeletexString.
949 -- For UTF8String or UniversalString at least four times the upper
950 -- bound should be allowed.
951
952
953
954 END