asn1_read_value() and friends understand the ?CURRENT keyword.
[platform/upstream/libtasn1.git] / tests / pkix.asn
1
2 PKIX1 { }
3
4 DEFINITIONS IMPLICIT TAGS ::=
5
6 BEGIN
7
8 -- This contains both PKIX1Implicit88 and RFC2630 ASN.1 modules.
9
10 -- ISO arc for standard certificate and CRL extensions
11
12 id-ce OBJECT IDENTIFIER  ::=  {joint-iso-ccitt(2) ds(5) 29}
13
14
15 -- authority key identifier OID and syntax
16
17 id-ce-authorityKeyIdentifier OBJECT IDENTIFIER ::=  { id-ce 35 }
18
19 AuthorityKeyIdentifier ::= SEQUENCE {
20       keyIdentifier             [0] KeyIdentifier            OPTIONAL,
21       authorityCertIssuer       [1] GeneralNames             OPTIONAL,
22       authorityCertSerialNumber [2] CertificateSerialNumber  OPTIONAL }
23     -- authorityCertIssuer and authorityCertSerialNumber shall both
24     -- be present or both be absgent
25
26 KeyIdentifier ::= OCTET STRING
27
28 -- subject key identifier OID and syntax
29
30 id-ce-subjectKeyIdentifier OBJECT IDENTIFIER ::=  { id-ce 14 }
31
32 SubjectKeyIdentifier ::= KeyIdentifier
33
34 -- key usage extension OID and syntax
35
36 id-ce-keyUsage OBJECT IDENTIFIER ::=  { id-ce 15 }
37
38 KeyUsage ::= BIT STRING {
39      digitalSignature        (0),
40      nonRepudiation          (1),
41      keyEncipherment         (2),
42      dataEncipherment        (3),
43      keyAgreement            (4),
44      keyCertSign             (5),
45      cRLSign                 (6),
46      encipherOnly            (7),
47      decipherOnly            (8) }
48
49 -- private key usage period extension OID and syntax
50
51 id-ce-privateKeyUsagePeriod OBJECT IDENTIFIER ::=  { id-ce 16 }
52
53 PrivateKeyUsagePeriod ::= SEQUENCE {
54      notBefore       [0]     GeneralizedTime OPTIONAL,
55      notAfter        [1]     GeneralizedTime OPTIONAL }
56      -- either notBefore or notAfter shall be present
57
58 -- certificate policies extension OID and syntax
59
60 id-ce-certificatePolicies OBJECT IDENTIFIER ::=  { id-ce 32 }
61
62 CertificatePolicies ::= SEQUENCE SIZE (1..MAX) OF PolicyInformation
63
64 PolicyInformation ::= SEQUENCE {
65      policyIdentifier   CertPolicyId,
66      policyQualifiers   SEQUENCE SIZE (1..MAX) OF
67              PolicyQualifierInfo OPTIONAL }
68
69 CertPolicyId ::= OBJECT IDENTIFIER
70
71 PolicyQualifierInfo ::= SEQUENCE {
72        policyQualifierId  PolicyQualifierId,
73        qualifier        ANY DEFINED BY policyQualifierId }
74
75 -- Implementations that recognize additional policy qualifiers shall
76 -- augment the following definition for PolicyQualifierId
77
78 PolicyQualifierId ::=
79     OBJECT IDENTIFIER  -- ( id-qt-cps | id-qt-unotice )
80
81 -- CPS pointer qualifier
82
83 CPSuri ::= IA5String
84
85 -- user notice qualifier
86
87 UserNotice ::= SEQUENCE {
88      noticeRef        NoticeReference OPTIONAL,
89      explicitText     DisplayText OPTIONAL}
90
91 NoticeReference ::= SEQUENCE {
92      organization     DisplayText,
93      noticeNumbers    SEQUENCE OF INTEGER }
94
95 DisplayText ::= CHOICE {
96      visibleString    VisibleString  (SIZE (1..200)),
97      bmpString        BMPString      (SIZE (1..200)),
98      utf8String       UTF8String     (SIZE (1..200)) }
99
100 -- policy mapping extension OID and syntax
101
102 id-ce-policyMappings OBJECT IDENTIFIER ::=  { id-ce 33 }
103
104 PolicyMappings ::= SEQUENCE SIZE (1..MAX) OF SEQUENCE {
105      issuerDomainPolicy      CertPolicyId,
106      subjectDomainPolicy     CertPolicyId }
107
108 -- subject alternative name extension OID and syntax
109
110 -- Directory string type --
111
112 DirectoryString ::= CHOICE {
113       teletexString             TeletexString (SIZE (1..MAX)),
114       printableString           PrintableString (SIZE (1..MAX)),
115       universalString           UniversalString (SIZE (1..MAX)),
116       utf8String              UTF8String (SIZE (1..MAX)),
117       bmpString               BMPString (SIZE(1..MAX)),
118       -- IA5String is added here to handle old UID encoded as ia5String --
119       -- See tests/userid/ for more information.  It shouldn't be here, --
120       -- so if it causes problems, considering dropping it. --
121       ia5String               IA5String (SIZE(1..MAX)) }
122
123 id-ce-subjectAltName OBJECT IDENTIFIER ::=  { id-ce 17 }
124
125 SubjectAltName ::= GeneralNames
126
127 GeneralNames ::= SEQUENCE SIZE (1..MAX) OF GeneralName
128
129 GeneralName ::= CHOICE {
130      otherName                       [0]     AnotherName,
131      rfc822Name                      [1]     IA5String,
132      dNSName                         [2]     IA5String,
133      x400Address                     [3]     ORAddress,
134 -- Changed to work with the libtasn1 parser.
135      directoryName                   [4]     EXPLICIT RDNSequence, --Name,
136      ediPartyName                    [5]     EDIPartyName,
137      uniformResourceIdentifier       [6]     IA5String,
138      iPAddress                       [7]     OCTET STRING,
139      registeredID                    [8]     OBJECT IDENTIFIER }
140
141 -- AnotherName replaces OTHER-NAME ::= TYPE-IDENTIFIER, as
142 -- TYPE-IDENTIFIER is not supported in the '88 ASN.1 syntax
143
144 AnotherName ::= SEQUENCE {
145      type-id    OBJECT IDENTIFIER,
146      value      [0] EXPLICIT ANY DEFINED BY type-id }
147
148 EDIPartyName ::= SEQUENCE {
149      nameAssigner            [0]     DirectoryString OPTIONAL,
150      partyName               [1]     DirectoryString }
151
152 -- issuer alternative name extension OID and syntax
153
154 id-ce-issuerAltName OBJECT IDENTIFIER ::=  { id-ce 18 }
155
156 IssuerAltName ::= GeneralNames
157
158 id-ce-subjectDirectoryAttributes OBJECT IDENTIFIER ::=  { id-ce 9 }
159
160 SubjectDirectoryAttributes ::= SEQUENCE SIZE (1..MAX) OF Attribute
161
162 -- basic constraints extension OID and syntax
163
164 id-ce-basicConstraints OBJECT IDENTIFIER ::=  { id-ce 19 }
165
166 BasicConstraints ::= SEQUENCE {
167      cA                      BOOLEAN DEFAULT FALSE,
168      pathLenConstraint       INTEGER (0..MAX) OPTIONAL }
169
170 -- name constraints extension OID and syntax
171
172 id-ce-nameConstraints OBJECT IDENTIFIER ::=  { id-ce 30 }
173
174 NameConstraints ::= SEQUENCE {
175      permittedSubtrees       [0]     GeneralSubtrees OPTIONAL,
176      excludedSubtrees        [1]     GeneralSubtrees OPTIONAL }
177
178 GeneralSubtrees ::= SEQUENCE SIZE (1..MAX) OF GeneralSubtree
179
180 GeneralSubtree ::= SEQUENCE {
181      base                    GeneralName,
182      minimum         [0]     BaseDistance DEFAULT 0,
183      maximum         [1]     BaseDistance OPTIONAL }
184
185 BaseDistance ::= INTEGER (0..MAX)
186
187 -- policy constraints extension OID and syntax
188
189 id-ce-policyConstraints OBJECT IDENTIFIER ::=  { id-ce 36 }
190
191 PolicyConstraints ::= SEQUENCE {
192      requireExplicitPolicy           [0] SkipCerts OPTIONAL,
193      inhibitPolicyMapping            [1] SkipCerts OPTIONAL }
194
195 SkipCerts ::= INTEGER (0..MAX)
196
197 -- CRL distribution points extension OID and syntax
198
199 id-ce-cRLDistributionPoints     OBJECT IDENTIFIER  ::=  {id-ce 31}
200
201 CRLDistributionPoints ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint
202
203 DistributionPoint ::= SEQUENCE {
204      distributionPoint       [0]     EXPLICIT DistributionPointName OPTIONAL,
205      reasons                 [1]     ReasonFlags OPTIONAL,
206      cRLIssuer               [2]     GeneralNames OPTIONAL
207 }
208
209 DistributionPointName ::= CHOICE {
210     fullName                [0]     GeneralNames,
211     nameRelativeToCRLIssuer [1]     RelativeDistinguishedName
212 }
213
214 ReasonFlags ::= BIT STRING {
215      unused                  (0),
216      keyCompromise           (1),
217      cACompromise            (2),
218      affiliationChanged      (3),
219      superseded              (4),
220      cessationOfOperation    (5),
221      certificateHold         (6),
222      privilegeWithdrawn      (7),
223      aACompromise            (8) }
224
225 -- extended key usage extension OID and syntax
226
227 id-ce-extKeyUsage OBJECT IDENTIFIER ::= {id-ce 37}
228
229 ExtKeyUsageSyntax ::= SEQUENCE SIZE (1..MAX) OF KeyPurposeId
230
231 KeyPurposeId ::= OBJECT IDENTIFIER
232
233 -- extended key purpose OIDs
234 id-kp-serverAuth      OBJECT IDENTIFIER ::= { id-kp 1 }
235 id-kp-clientAuth      OBJECT IDENTIFIER ::= { id-kp 2 }
236 id-kp-codeSigning     OBJECT IDENTIFIER ::= { id-kp 3 }
237 id-kp-emailProtection OBJECT IDENTIFIER ::= { id-kp 4 }
238 id-kp-ipsecEndSystem  OBJECT IDENTIFIER ::= { id-kp 5 }
239 id-kp-ipsecTunnel     OBJECT IDENTIFIER ::= { id-kp 6 }
240 id-kp-ipsecUser       OBJECT IDENTIFIER ::= { id-kp 7 }
241 id-kp-timeStamping    OBJECT IDENTIFIER ::= { id-kp 8 }
242
243 -- authority info access
244
245 id-pe-authorityInfoAccess OBJECT IDENTIFIER ::= { id-pe 1 }
246
247 AuthorityInfoAccessSyntax  ::=
248         SEQUENCE SIZE (1..MAX) OF AccessDescription
249
250 AccessDescription  ::=  SEQUENCE {
251         accessMethod          OBJECT IDENTIFIER,
252         accessLocation        GeneralName  }
253
254 -- CRL number extension OID and syntax
255
256 id-ce-cRLNumber OBJECT IDENTIFIER ::= { id-ce 20 }
257
258 CRLNumber ::= INTEGER (0..MAX)
259
260 -- issuing distribution point extension OID and syntax
261
262 id-ce-issuingDistributionPoint OBJECT IDENTIFIER ::= { id-ce 28 }
263
264 IssuingDistributionPoint ::= SEQUENCE {
265      distributionPoint       [0] DistributionPointName OPTIONAL,
266      onlyContainsUserCerts   [1] BOOLEAN DEFAULT FALSE,
267      onlyContainsCACerts     [2] BOOLEAN DEFAULT FALSE,
268      onlySomeReasons         [3] ReasonFlags OPTIONAL,
269      indirectCRL             [4] BOOLEAN DEFAULT FALSE }
270
271
272 id-ce-deltaCRLIndicator OBJECT IDENTIFIER ::= { id-ce 27 }
273
274 -- deltaCRLIndicator ::= BaseCRLNumber
275
276 BaseCRLNumber ::= CRLNumber
277
278 -- CRL reasons extension OID and syntax
279
280 id-ce-cRLReasons OBJECT IDENTIFIER ::= { id-ce 21 }
281
282 CRLReason ::= ENUMERATED {
283      unspecified             (0),
284      keyCompromise           (1),
285      cACompromise            (2),
286      affiliationChanged      (3),
287      superseded              (4),
288      cessationOfOperation    (5),
289      certificateHold         (6),
290      removeFromCRL           (8) }
291
292 -- certificate issuer CRL entry extension OID and syntax
293
294 id-ce-certificateIssuer OBJECT IDENTIFIER ::= { id-ce 29 }
295
296 CertificateIssuer ::= GeneralNames
297
298 -- hold instruction extension OID and syntax
299
300 id-ce-holdInstructionCode OBJECT IDENTIFIER ::= { id-ce 23 }
301
302 HoldInstructionCode ::= OBJECT IDENTIFIER
303
304 -- ANSI x9 holdinstructions
305
306 -- ANSI x9 arc holdinstruction arc
307 holdInstruction OBJECT IDENTIFIER ::=
308           {joint-iso-itu-t(2) member-body(2) us(840) x9cm(10040) 2}
309
310 -- ANSI X9 holdinstructions referenced by this standard
311 id-holdinstruction-none OBJECT IDENTIFIER  ::=
312                 {holdInstruction 1} -- deprecated
313 id-holdinstruction-callissuer OBJECT IDENTIFIER ::=
314                 {holdInstruction 2}
315 id-holdinstruction-reject OBJECT IDENTIFIER ::=
316                 {holdInstruction 3}
317
318 -- invalidity date CRL entry extension OID and syntax
319
320 id-ce-invalidityDate OBJECT IDENTIFIER ::= { id-ce 24 }
321
322 InvalidityDate ::=  GeneralizedTime
323
324
325 -- --------------------------------------
326 --  EXPLICIT
327 -- --------------------------------------
328
329 -- UNIVERSAL Types defined in '93 and '98 ASN.1
330 -- but required by this specification
331
332 VisibleString ::= [UNIVERSAL 26] IMPLICIT OCTET STRING
333
334 NumericString ::= [UNIVERSAL 18] IMPLICIT OCTET STRING
335
336 IA5String ::= [UNIVERSAL 22] IMPLICIT OCTET STRING
337
338 TeletexString ::= [UNIVERSAL 20] IMPLICIT OCTET STRING
339
340 PrintableString ::= [UNIVERSAL 19] IMPLICIT OCTET STRING
341
342 UniversalString ::= [UNIVERSAL 28] IMPLICIT OCTET STRING
343         -- UniversalString is defined in ASN.1:1993
344
345 BMPString ::= [UNIVERSAL 30] IMPLICIT OCTET STRING
346       -- BMPString is the subtype of UniversalString and models
347        -- the Basic Multilingual Plane of ISO/IEC/ITU 10646-1
348
349 UTF8String ::= [UNIVERSAL 12] IMPLICIT OCTET STRING
350         -- The content of this type conforms to RFC 2279.
351
352
353 -- PKIX specific OIDs
354
355 id-pkix  OBJECT IDENTIFIER  ::=
356          { iso(1) identified-organization(3) dod(6) internet(1)
357                     security(5) mechanisms(5) pkix(7) }
358
359 -- PKIX arcs
360
361 id-pe OBJECT IDENTIFIER  ::=  { id-pkix 1 }
362         -- arc for private certificate extensions
363 id-qt OBJECT IDENTIFIER ::= { id-pkix 2 }
364         -- arc for policy qualifier types
365 id-kp OBJECT IDENTIFIER ::= { id-pkix 3 }
366         -- arc for extended key purpose OIDS
367 id-ad OBJECT IDENTIFIER ::= { id-pkix 48 }
368         -- arc for access descriptors
369
370 -- policyQualifierIds for Internet policy qualifiers
371
372 id-qt-cps      OBJECT IDENTIFIER ::=  { id-qt 1 }
373         -- OID for CPS qualifier
374 id-qt-unotice  OBJECT IDENTIFIER ::=  { id-qt 2 }
375         -- OID for user notice qualifier
376
377 -- access descriptor definitions
378
379 id-ad-ocsp      OBJECT IDENTIFIER ::= { id-ad 1 }
380 id-ad-caIssuers OBJECT IDENTIFIER ::= { id-ad 2 }
381
382 -- attribute data types --
383
384 Attribute       ::=     SEQUENCE {
385         type            AttributeType,
386         values  SET OF AttributeValue
387                 -- at least one value is required --
388 }
389
390 AttributeType           ::=   OBJECT IDENTIFIER
391
392 AttributeValue          ::=   ANY DEFINED BY type
393
394 AttributeTypeAndValue           ::=     SEQUENCE {
395         type    AttributeType,
396         value   AttributeValue }
397
398 -- suggested naming attributes: Definition of the following
399 --  information object set may be augmented to meet local
400 --  requirements.  Note that deleting members of the set may
401 --  prevent interoperability with conforming implementations.
402 --  presented in pairs: the AttributeType followed by the
403 --  type definition for the corresponding AttributeValue
404
405 -- Arc for standard naming attributes
406 id-at           OBJECT IDENTIFIER ::= {joint-iso-ccitt(2) ds(5) 4}
407
408 -- Attributes of type NameDirectoryString
409 id-at-initials          AttributeType ::= { id-at 43 }
410 X520initials ::= DirectoryString
411
412 id-at-generationQualifier AttributeType ::= { id-at 44 }
413 X520generationQualifier ::= DirectoryString
414
415 id-at-surname           AttributeType ::= { id-at 4 }
416 X520surName ::= DirectoryString
417
418 id-at-givenName         AttributeType ::= { id-at 42 }
419 X520givenName ::= DirectoryString
420
421 id-at-name              AttributeType ::= { id-at 41 }
422 X520name        ::= DirectoryString
423
424 id-at-commonName        AttributeType   ::=     {id-at 3}
425 X520CommonName  ::=      DirectoryString
426
427 id-at-localityName      AttributeType   ::=     {id-at 7}
428 X520LocalityName ::= DirectoryString
429
430 id-at-stateOrProvinceName       AttributeType   ::=     {id-at 8}
431 X520StateOrProvinceName         ::= DirectoryString
432
433 id-at-organizationName          AttributeType   ::=     {id-at 10}
434 X520OrganizationName ::= DirectoryString
435
436 id-at-organizationalUnitName    AttributeType   ::=     {id-at 11}
437 X520OrganizationalUnitName ::= DirectoryString
438
439 id-at-title     AttributeType   ::=     {id-at 12}
440 X520Title ::=   DirectoryString
441
442 id-at-description     AttributeType   ::=     {id-at 13}
443 X520Description ::=   DirectoryString
444
445 id-at-dnQualifier       AttributeType   ::=     {id-at 46}
446 X520dnQualifier ::=     PrintableString
447
448 id-at-countryName       AttributeType   ::=     {id-at 6}
449 X520countryName ::=     PrintableString (SIZE (2)) -- IS 3166 codes
450
451 id-at-serialNumber       AttributeType   ::=     {id-at 5}
452 X520serialNumber ::=     PrintableString
453
454 id-at-telephoneNumber       AttributeType   ::=     {id-at 20}
455 X520telephoneNumber ::=     PrintableString
456
457 id-at-facsimileTelephoneNumber       AttributeType   ::=     {id-at 23}
458 X520facsimileTelephoneNumber ::=     PrintableString
459
460 id-at-pseudonym         AttributeType   ::=     {id-at 65}
461 X520pseudonym ::=       DirectoryString
462
463 id-at-name      AttributeType   ::=     {id-at 41}
464 X520name ::=    DirectoryString
465
466 id-at-streetAddress     AttributeType   ::=     {id-at 9}
467 X520streetAddress ::=   DirectoryString
468
469 id-at-postalAddress     AttributeType   ::=     {id-at 16}
470 X520postalAddress ::= PostalAddress
471
472 PostalAddress ::= SEQUENCE OF DirectoryString
473
474
475  -- Legacy attributes
476
477 pkcs OBJECT IDENTIFIER ::=
478        { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) }
479
480 pkcs-9 OBJECT IDENTIFIER ::=
481        { pkcs 9 }
482
483
484 emailAddress AttributeType      ::= { pkcs-9 1 }
485
486 Pkcs9email ::= IA5String (SIZE (1..ub-emailaddress-length))
487
488 -- naming data types --
489
490 Name            ::=   CHOICE { -- only one possibility for now --
491                                  rdnSequence  RDNSequence }
492
493 RDNSequence     ::=   SEQUENCE OF RelativeDistinguishedName
494
495 DistinguishedName       ::=   RDNSequence
496
497 RelativeDistinguishedName  ::=
498                     SET SIZE (1 .. MAX) OF AttributeTypeAndValue
499
500
501
502 -- --------------------------------------------------------
503 -- certificate and CRL specific structures begin here
504 -- --------------------------------------------------------
505
506 Certificate  ::=  SEQUENCE  {
507      tbsCertificate       TBSCertificate,
508      signatureAlgorithm   AlgorithmIdentifier,
509      signature            BIT STRING  }
510
511 TBSCertificate  ::=  SEQUENCE  {
512      version         [0]  EXPLICIT Version DEFAULT v1,
513      serialNumber         CertificateSerialNumber,
514      signature            AlgorithmIdentifier,
515      issuer               Name,
516      validity             Validity,
517      subject              Name,
518      subjectPublicKeyInfo SubjectPublicKeyInfo,
519      issuerUniqueID  [1]  IMPLICIT UniqueIdentifier OPTIONAL,
520                           -- If present, version shall be v2 or v3
521      subjectUniqueID [2]  IMPLICIT UniqueIdentifier OPTIONAL,
522                           -- If present, version shall be v2 or v3
523      extensions      [3]  EXPLICIT Extensions OPTIONAL
524                           -- If present, version shall be v3 --
525 }
526
527 Version  ::=  INTEGER  {  v1(0), v2(1), v3(2)  }
528
529 CertificateSerialNumber  ::=  INTEGER
530
531 Validity ::= SEQUENCE {
532      notBefore      Time,
533      notAfter       Time }
534
535 Time ::= CHOICE {
536      utcTime        UTCTime,
537      generalTime    GeneralizedTime }
538
539 UniqueIdentifier  ::=  BIT STRING
540
541 SubjectPublicKeyInfo  ::=  SEQUENCE  {
542      algorithm            AlgorithmIdentifier,
543      subjectPublicKey     BIT STRING  }
544
545 Extensions  ::=  SEQUENCE SIZE (1..MAX) OF Extension
546
547 Extension  ::=  SEQUENCE  {
548      extnID      OBJECT IDENTIFIER,
549      critical    BOOLEAN DEFAULT FALSE,
550      extnValue   OCTET STRING  }
551
552
553 -- ------------------------------------------
554 -- CRL structures
555 -- ------------------------------------------
556
557 CertificateList  ::=  SEQUENCE  {
558      tbsCertList          TBSCertList,
559      signatureAlgorithm   AlgorithmIdentifier,
560      signature            BIT STRING  }
561
562 TBSCertList  ::=  SEQUENCE  {
563      version                 Version OPTIONAL,
564                                   -- if present, shall be v2
565      signature               AlgorithmIdentifier,
566      issuer                  Name,
567      thisUpdate              Time,
568      nextUpdate              Time OPTIONAL,
569      revokedCertificates     SEQUENCE OF SEQUENCE  {
570           userCertificate         CertificateSerialNumber,
571           revocationDate          Time,
572           crlEntryExtensions      Extensions OPTIONAL
573                                          -- if present, shall be v2
574                                }  OPTIONAL,
575      crlExtensions           [0] EXPLICIT Extensions OPTIONAL
576                                          -- if present, shall be v2 --
577 }
578
579 -- Version, Time, CertificateSerialNumber, and Extensions were
580 -- defined earlier for use in the certificate structure
581
582 AlgorithmIdentifier  ::=  SEQUENCE  {
583      algorithm               OBJECT IDENTIFIER,
584      parameters              ANY DEFINED BY algorithm OPTIONAL  }
585                                 -- contains a value of the type
586                                 -- registered for use with the
587                                 -- algorithm object identifier value
588
589 -- Algorithm OIDs and parameter structures
590
591 pkcs-1 OBJECT IDENTIFIER ::= {
592      pkcs 1 }
593
594 rsaEncryption OBJECT IDENTIFIER ::=  { pkcs-1 1 }
595
596 md2WithRSAEncryption OBJECT IDENTIFIER  ::=  { pkcs-1 2 }
597
598 md5WithRSAEncryption OBJECT IDENTIFIER  ::=  { pkcs-1 4 }
599
600 sha1WithRSAEncryption OBJECT IDENTIFIER  ::=  { pkcs-1 5 }
601
602 id-dsa-with-sha1 OBJECT IDENTIFIER ::=  {
603      iso(1) member-body(2) us(840) x9-57 (10040) x9algorithm(4) 3 }
604
605 Dss-Sig-Value ::= SEQUENCE {
606      r       INTEGER,
607      s       INTEGER
608 }
609
610 dhpublicnumber OBJECT IDENTIFIER ::= {
611      iso(1) member-body(2) us(840) ansi-x942(10046) number-type(2) 1 }
612
613 DomainParameters ::= SEQUENCE {
614      p       INTEGER, -- odd prime, p=jq +1
615      g       INTEGER, -- generator, g
616      q       INTEGER, -- factor of p-1
617      j       INTEGER OPTIONAL, -- subgroup factor, j>= 2
618      validationParms  ValidationParms OPTIONAL }
619
620 ValidationParms ::= SEQUENCE {
621      seed             BIT STRING,
622      pgenCounter      INTEGER }
623
624 id-dsa OBJECT IDENTIFIER ::= {
625      iso(1) member-body(2) us(840) x9-57(10040) x9algorithm(4) 1 }
626
627 Dss-Parms  ::=  SEQUENCE  {
628      p             INTEGER,
629      q             INTEGER,
630      g             INTEGER  }
631
632 -- x400 address syntax starts here
633 --      OR Names
634
635 ORAddress ::= SEQUENCE {
636    built-in-standard-attributes BuiltInStandardAttributes,
637    built-in-domain-defined-attributes
638                         BuiltInDomainDefinedAttributes OPTIONAL,
639    -- see also teletex-domain-defined-attributes
640    extension-attributes ExtensionAttributes OPTIONAL }
641 --      The OR-address is semantically absent from the OR-name if the
642 --      built-in-standard-attribute sequence is empty and the
643 --      built-in-domain-defined-attributes and extension-attributes are
644 --      both omitted.
645
646 --      Built-in Standard Attributes
647
648 BuiltInStandardAttributes ::= SEQUENCE {
649    country-name CountryName OPTIONAL,
650    administration-domain-name AdministrationDomainName OPTIONAL,
651    network-address      [0] EXPLICIT NetworkAddress OPTIONAL,
652    -- see also extended-network-address
653    terminal-identifier  [1] EXPLICIT TerminalIdentifier OPTIONAL,
654    private-domain-name  [2] EXPLICIT PrivateDomainName OPTIONAL,
655    organization-name    [3] EXPLICIT OrganizationName OPTIONAL,
656    -- see also teletex-organization-name
657    numeric-user-identifier      [4] EXPLICIT NumericUserIdentifier OPTIONAL,
658    personal-name        [5] EXPLICIT PersonalName OPTIONAL,
659    -- see also teletex-personal-name
660    organizational-unit-names    [6] EXPLICIT OrganizationalUnitNames OPTIONAL
661    -- see also teletex-organizational-unit-names --
662 }
663
664 CountryName ::= [APPLICATION 1] CHOICE {
665    x121-dcc-code NumericString
666                 (SIZE (ub-country-name-numeric-length)),
667    iso-3166-alpha2-code PrintableString
668                 (SIZE (ub-country-name-alpha-length)) }
669
670 AdministrationDomainName ::= [APPLICATION 2] EXPLICIT CHOICE {
671    numeric NumericString (SIZE (0..ub-domain-name-length)),
672    printable PrintableString (SIZE (0..ub-domain-name-length)) }
673
674 NetworkAddress ::= X121Address  -- see also extended-network-address
675
676 X121Address ::= NumericString (SIZE (1..ub-x121-address-length))
677
678 TerminalIdentifier ::= PrintableString (SIZE (1..ub-terminal-id-length))
679
680 PrivateDomainName ::= CHOICE {
681    numeric NumericString (SIZE (1..ub-domain-name-length)),
682    printable PrintableString (SIZE (1..ub-domain-name-length)) }
683
684 OrganizationName ::= PrintableString
685                             (SIZE (1..ub-organization-name-length))
686 -- see also teletex-organization-name
687
688 NumericUserIdentifier ::= NumericString
689                             (SIZE (1..ub-numeric-user-id-length))
690
691 PersonalName ::= SET {
692    surname [0] PrintableString (SIZE (1..ub-surname-length)),
693    given-name [1] PrintableString
694                         (SIZE (1..ub-given-name-length)) OPTIONAL,
695    initials [2] PrintableString (SIZE (1..ub-initials-length)) OPTIONAL,
696    generation-qualifier [3] PrintableString
697                 (SIZE (1..ub-generation-qualifier-length)) OPTIONAL }
698 -- see also teletex-personal-name
699
700 OrganizationalUnitNames ::= SEQUENCE SIZE (1..ub-organizational-units)
701                                         OF OrganizationalUnitName
702 -- see also teletex-organizational-unit-names
703
704 OrganizationalUnitName ::= PrintableString (SIZE
705                         (1..ub-organizational-unit-name-length))
706
707 --      Built-in Domain-defined Attributes
708
709 BuiltInDomainDefinedAttributes ::= SEQUENCE SIZE
710                                 (1..ub-domain-defined-attributes) OF
711                                 BuiltInDomainDefinedAttribute
712
713 BuiltInDomainDefinedAttribute ::= SEQUENCE {
714    type PrintableString (SIZE
715                         (1..ub-domain-defined-attribute-type-length)),
716    value PrintableString (SIZE
717                         (1..ub-domain-defined-attribute-value-length))}
718
719 --      Extension Attributes
720
721 ExtensionAttributes ::= SET SIZE (1..ub-extension-attributes) OF
722                         ExtensionAttribute
723
724 ExtensionAttribute ::=  SEQUENCE {
725    extension-attribute-type [0] EXPLICIT INTEGER (0..ub-extension-attributes),
726    extension-attribute-value [1] EXPLICIT
727                         ANY DEFINED BY extension-attribute-type }
728
729 -- Extension types and attribute values
730 --
731
732 common-name INTEGER ::= 1
733
734 CommonName ::= PrintableString (SIZE (1..ub-common-name-length))
735
736 teletex-common-name INTEGER ::= 2
737
738 TeletexCommonName ::= TeletexString (SIZE (1..ub-common-name-length))
739
740 teletex-organization-name INTEGER ::= 3
741
742 TeletexOrganizationName ::=
743                 TeletexString (SIZE (1..ub-organization-name-length))
744
745 teletex-personal-name INTEGER ::= 4
746
747 TeletexPersonalName ::= SET {
748    surname [0] EXPLICIT TeletexString (SIZE (1..ub-surname-length)),
749    given-name [1] EXPLICIT TeletexString
750                 (SIZE (1..ub-given-name-length)) OPTIONAL,
751    initials [2] EXPLICIT TeletexString (SIZE (1..ub-initials-length)) OPTIONAL,
752    generation-qualifier [3] EXPLICIT TeletexString (SIZE
753                 (1..ub-generation-qualifier-length)) OPTIONAL }
754
755 teletex-organizational-unit-names INTEGER ::= 5
756
757 TeletexOrganizationalUnitNames ::= SEQUENCE SIZE
758         (1..ub-organizational-units) OF TeletexOrganizationalUnitName
759
760 TeletexOrganizationalUnitName ::= TeletexString
761                         (SIZE (1..ub-organizational-unit-name-length))
762
763 pds-name INTEGER ::= 7
764
765 PDSName ::= PrintableString (SIZE (1..ub-pds-name-length))
766
767 physical-delivery-country-name INTEGER ::= 8
768
769 PhysicalDeliveryCountryName ::= CHOICE {
770    x121-dcc-code NumericString (SIZE (ub-country-name-numeric-length)),
771    iso-3166-alpha2-code PrintableString
772                         (SIZE (ub-country-name-alpha-length)) }
773
774 postal-code INTEGER ::= 9
775
776 PostalCode ::= CHOICE {
777    numeric-code NumericString (SIZE (1..ub-postal-code-length)),
778    printable-code PrintableString (SIZE (1..ub-postal-code-length)) }
779
780 physical-delivery-office-name INTEGER ::= 10
781
782 PhysicalDeliveryOfficeName ::= PDSParameter
783
784 physical-delivery-office-number INTEGER ::= 11
785
786 PhysicalDeliveryOfficeNumber ::= PDSParameter
787
788 extension-OR-address-components INTEGER ::= 12
789
790 ExtensionORAddressComponents ::= PDSParameter
791
792 physical-delivery-personal-name INTEGER ::= 13
793
794 PhysicalDeliveryPersonalName ::= PDSParameter
795
796 physical-delivery-organization-name INTEGER ::= 14
797
798 PhysicalDeliveryOrganizationName ::= PDSParameter
799
800 extension-physical-delivery-address-components INTEGER ::= 15
801
802 ExtensionPhysicalDeliveryAddressComponents ::= PDSParameter
803
804 unformatted-postal-address INTEGER ::= 16
805
806 UnformattedPostalAddress ::= SET {
807    printable-address SEQUENCE SIZE (1..ub-pds-physical-address-lines) OF
808            PrintableString (SIZE (1..ub-pds-parameter-length)) OPTIONAL,
809    teletex-string TeletexString
810          (SIZE (1..ub-unformatted-address-length)) OPTIONAL }
811
812 street-address INTEGER ::= 17
813
814 StreetAddress ::= PDSParameter
815
816 post-office-box-address INTEGER ::= 18
817
818 PostOfficeBoxAddress ::= PDSParameter
819
820 poste-restante-address INTEGER ::= 19
821
822 PosteRestanteAddress ::= PDSParameter
823
824 unique-postal-name INTEGER ::= 20
825
826 UniquePostalName ::= PDSParameter
827
828 local-postal-attributes INTEGER ::= 21
829
830 LocalPostalAttributes ::= PDSParameter
831
832 PDSParameter ::= SET {
833    printable-string PrintableString
834                 (SIZE(1..ub-pds-parameter-length)) OPTIONAL,
835    teletex-string TeletexString
836                 (SIZE(1..ub-pds-parameter-length)) OPTIONAL }
837
838 extended-network-address INTEGER ::= 22
839
840 ExtendedNetworkAddress ::= CHOICE {
841    e163-4-address SEQUENCE {
842         number [0] EXPLICIT NumericString (SIZE (1..ub-e163-4-number-length)),
843         sub-address [1] EXPLICIT NumericString
844                 (SIZE (1..ub-e163-4-sub-address-length)) OPTIONAL },
845    psap-address [0] EXPLICIT PresentationAddress }
846
847 PresentationAddress ::= SEQUENCE {
848         pSelector       [0] EXPLICIT OCTET STRING OPTIONAL,
849         sSelector       [1] EXPLICIT OCTET STRING OPTIONAL,
850         tSelector       [2] EXPLICIT OCTET STRING OPTIONAL,
851         nAddresses      [3] EXPLICIT SET SIZE (1..MAX) OF OCTET STRING }
852
853 terminal-type  INTEGER ::= 23
854
855 TerminalType ::= INTEGER {
856    telex (3),
857    teletex (4),
858    g3-facsimile (5),
859    g4-facsimile (6),
860    ia5-terminal (7),
861    videotex (8) } -- (0..ub-integer-options)
862
863 --      Extension Domain-defined Attributes
864
865 teletex-domain-defined-attributes INTEGER ::= 6
866
867 TeletexDomainDefinedAttributes ::= SEQUENCE SIZE
868    (1..ub-domain-defined-attributes) OF TeletexDomainDefinedAttribute
869
870 TeletexDomainDefinedAttribute ::= SEQUENCE {
871         type TeletexString
872                (SIZE (1..ub-domain-defined-attribute-type-length)),
873         value TeletexString
874                (SIZE (1..ub-domain-defined-attribute-value-length)) }
875
876 --  specifications of Upper Bounds shall be regarded as mandatory
877 --  from Annex B of ITU-T X.411 Reference Definition of MTS Parameter
878 --  Upper Bounds
879
880 --      Upper Bounds
881 ub-name INTEGER ::=     32768
882 ub-common-name  INTEGER ::=     64
883 ub-locality-name        INTEGER ::=     128
884 ub-state-name   INTEGER ::=     128
885 ub-organization-name    INTEGER ::=     64
886 ub-organizational-unit-name     INTEGER ::=     64
887 ub-title        INTEGER ::=     64
888 ub-match        INTEGER ::=     128
889
890 ub-emailaddress-length INTEGER ::= 128
891
892 ub-common-name-length INTEGER ::= 64
893 ub-country-name-alpha-length INTEGER ::= 2
894 ub-country-name-numeric-length INTEGER ::= 3
895 ub-domain-defined-attributes INTEGER ::= 4
896 ub-domain-defined-attribute-type-length INTEGER ::= 8
897 ub-domain-defined-attribute-value-length INTEGER ::= 128
898 ub-domain-name-length INTEGER ::= 16
899 ub-extension-attributes INTEGER ::= 256
900 ub-e163-4-number-length INTEGER ::= 15
901 ub-e163-4-sub-address-length INTEGER ::= 40
902 ub-generation-qualifier-length INTEGER ::= 3
903 ub-given-name-length INTEGER ::= 16
904 ub-initials-length INTEGER ::= 5
905 ub-integer-options INTEGER ::= 256
906 ub-numeric-user-id-length INTEGER ::= 32
907 ub-organization-name-length INTEGER ::= 64
908 ub-organizational-unit-name-length INTEGER ::= 32
909 ub-organizational-units INTEGER ::= 4
910 ub-pds-name-length INTEGER ::= 16
911 ub-pds-parameter-length INTEGER ::= 30
912 ub-pds-physical-address-lines INTEGER ::= 6
913 ub-postal-code-length INTEGER ::= 16
914 ub-surname-length INTEGER ::= 40
915 ub-terminal-id-length INTEGER ::= 24
916 ub-unformatted-address-length INTEGER ::= 180
917 ub-x121-address-length INTEGER ::= 16
918
919 -- Note - upper bounds on string types, such as TeletexString, are
920 -- measured in characters.  Excepting PrintableString or IA5String, a
921 -- significantly greater number of octets will be required to hold
922 -- such a value.  As a minimum, 16 octets, or twice the specified upper
923 -- bound, whichever is the larger, should be allowed for TeletexString.
924 -- For UTF8String or UniversalString at least four times the upper
925 -- bound should be allowed.
926
927
928
929 -- END of PKIX1Implicit88
930
931
932 -- BEGIN of RFC2630
933
934 -- Cryptographic Message Syntax
935
936 pkcs-7-ContentInfo ::= SEQUENCE {
937   contentType pkcs-7-ContentType,
938   content [0] EXPLICIT ANY DEFINED BY contentType }
939
940 pkcs-7-DigestInfo ::= SEQUENCE {
941   digestAlgorithm pkcs-7-DigestAlgorithmIdentifier,
942   digest pkcs-7-Digest
943 }
944
945 pkcs-7-Digest ::= OCTET STRING
946
947 pkcs-7-ContentType ::= OBJECT IDENTIFIER
948
949 pkcs-7-SignedData ::= SEQUENCE {
950   version pkcs-7-CMSVersion,
951   digestAlgorithms pkcs-7-DigestAlgorithmIdentifiers,
952   encapContentInfo pkcs-7-EncapsulatedContentInfo,
953   certificates [0] IMPLICIT pkcs-7-CertificateSet OPTIONAL,
954   crls [1] IMPLICIT pkcs-7-CertificateRevocationLists OPTIONAL,
955   signerInfos pkcs-7-SignerInfos
956 }
957
958 pkcs-7-CMSVersion ::= INTEGER  { v0(0), v1(1), v2(2), v3(3), v4(4) }
959
960 pkcs-7-DigestAlgorithmIdentifiers ::= SET OF pkcs-7-DigestAlgorithmIdentifier
961
962 pkcs-7-DigestAlgorithmIdentifier ::= AlgorithmIdentifier
963
964 pkcs-7-EncapsulatedContentInfo ::= SEQUENCE {
965   eContentType pkcs-7-ContentType,
966   eContent [0] EXPLICIT OCTET STRING OPTIONAL }
967
968 -- We don't use CertificateList here since we only want
969 -- to read the raw data.
970 pkcs-7-CertificateRevocationLists ::= SET OF ANY
971
972 pkcs-7-CertificateChoices ::= CHOICE {
973 -- Although the paper uses Certificate type, we
974 -- don't use it since, we don't need to parse it.
975 -- We only need to read and store it.
976   certificate ANY
977 }
978
979 pkcs-7-CertificateSet ::= SET OF pkcs-7-CertificateChoices
980
981 pkcs-7-SignerInfos ::= SET OF ANY -- this is not correct but we don't use it
982  -- anyway
983
984
985 -- BEGIN of RFC2986
986
987 -- Certificate requests
988 pkcs-10-CertificationRequestInfo ::= SEQUENCE {
989      version       INTEGER { v1(0) },
990      subject       Name,
991      subjectPKInfo SubjectPublicKeyInfo,
992      attributes    [0] Attributes
993 }
994
995 Attributes ::= SET OF Attribute
996
997 pkcs-10-CertificationRequest ::= SEQUENCE {
998      certificationRequestInfo pkcs-10-CertificationRequestInfo,
999      signatureAlgorithm AlgorithmIdentifier,
1000      signature          BIT STRING
1001 }
1002
1003 -- stuff from PKCS#9
1004
1005 pkcs-9-ub-challengePassword   INTEGER ::= 255
1006
1007 pkcs-9-certTypes OBJECT IDENTIFIER ::= {pkcs-9 22}
1008 pkcs-9-crlTypes OBJECT IDENTIFIER ::= {pkcs-9 23}
1009
1010 pkcs-9-at-challengePassword OBJECT IDENTIFIER   ::= {pkcs-9 7}
1011
1012 pkcs-9-challengePassword        ::= CHOICE {
1013       printableString       PrintableString (SIZE (1..pkcs-9-ub-challengePassword)),
1014       utf8String            UTF8String (SIZE (1..pkcs-9-ub-challengePassword)) }
1015
1016 pkcs-9-at-localKeyId               OBJECT IDENTIFIER ::= {pkcs-9 21}
1017
1018 pkcs-9-localKeyId ::= OCTET STRING
1019
1020 pkcs-9-at-friendlyName             OBJECT IDENTIFIER ::= {pkcs-9 20}
1021
1022 pkcs-9-friendlyName ::= BMPString      (SIZE (1..255))
1023
1024 -- PKCS #8 stuff
1025
1026 -- Private-key information syntax
1027
1028 pkcs-8-PrivateKeyInfo ::= SEQUENCE {
1029   version pkcs-8-Version,
1030   privateKeyAlgorithm AlgorithmIdentifier,
1031   privateKey pkcs-8-PrivateKey,
1032   attributes [0] Attributes OPTIONAL }
1033
1034 pkcs-8-Version ::= INTEGER {v1(0)}
1035
1036 pkcs-8-PrivateKey ::= OCTET STRING
1037
1038 pkcs-8-Attributes ::= SET OF Attribute
1039
1040 -- Encrypted private-key information syntax
1041
1042 pkcs-8-EncryptedPrivateKeyInfo ::= SEQUENCE {
1043     encryptionAlgorithm AlgorithmIdentifier,
1044     encryptedData pkcs-8-EncryptedData
1045 }
1046
1047 pkcs-8-EncryptedData ::= OCTET STRING
1048
1049 -- PKCS #5 stuff
1050
1051 pkcs-5 OBJECT IDENTIFIER ::=
1052        { pkcs 5 }
1053
1054 pkcs-5-encryptionAlgorithm OBJECT IDENTIFIER ::=
1055        { iso(1) member-body(2) us(840) rsadsi(113549) 3 }
1056
1057 pkcs-5-des-EDE3-CBC OBJECT IDENTIFIER ::= {pkcs-5-encryptionAlgorithm 7}
1058
1059 pkcs-5-des-EDE3-CBC-params ::= OCTET STRING (SIZE(8))
1060
1061 pkcs-5-id-PBES2 OBJECT IDENTIFIER ::= {pkcs-5 13}
1062
1063 pkcs-5-PBES2-params ::= SEQUENCE {
1064   keyDerivationFunc AlgorithmIdentifier,
1065   encryptionScheme AlgorithmIdentifier }
1066
1067 -- PBKDF2
1068
1069 pkcs-5-id-PBKDF2 OBJECT IDENTIFIER ::= {pkcs-5 12}
1070
1071 -- pkcs-5-id-hmacWithSHA1 OBJECT IDENTIFIER ::= {iso(1) member-body(2) us(840) rsadsi(113549) 2 7}
1072
1073 -- pkcs-5-algid-hmacWithSHA1 AlgorithmIdentifier ::=
1074 --   {algorithm pkcs-5-id-hmacWithSHA1, parameters NULL : NULL}
1075
1076 pkcs-5-PBKDF2-params ::= SEQUENCE {
1077   salt CHOICE {
1078     specified OCTET STRING,
1079     otherSource AlgorithmIdentifier
1080   },
1081   iterationCount INTEGER (1..MAX),
1082   keyLength INTEGER (1..MAX) OPTIONAL,
1083   prf AlgorithmIdentifier OPTIONAL -- DEFAULT pkcs-5-id-hmacWithSHA1
1084 }
1085
1086 -- PKCS #12 stuff
1087
1088 pkcs-12 OBJECT IDENTIFIER ::= {pkcs 12}
1089
1090 pkcs-12-PFX ::= SEQUENCE {
1091         version         INTEGER {v3(3)},
1092         authSafe        pkcs-7-ContentInfo,
1093         macData         pkcs-12-MacData OPTIONAL
1094 }
1095
1096 pkcs-12-PbeParams ::= SEQUENCE {
1097         salt    OCTET STRING,
1098         iterations INTEGER
1099 }
1100
1101 pkcs-12-MacData ::= SEQUENCE {
1102         mac             pkcs-7-DigestInfo,
1103         macSalt         OCTET STRING,
1104         iterations      INTEGER DEFAULT 1
1105 -- Note: The default is for historical reasons and its use is
1106 -- deprecated. A higher value, like 1024 is recommended.
1107 }
1108
1109 pkcs-12-AuthenticatedSafe ::= SEQUENCE OF pkcs-7-ContentInfo
1110         -- Data if unencrypted
1111         -- EncryptedData if password-encrypted
1112         -- EnvelopedData if public key-encrypted
1113
1114 pkcs-12-SafeContents ::= SEQUENCE OF pkcs-12-SafeBag
1115
1116 pkcs-12-SafeBag ::= SEQUENCE {
1117         bagId           OBJECT IDENTIFIER,
1118         bagValue        [0] EXPLICIT ANY DEFINED BY badId,
1119         bagAttributes   SET OF pkcs-12-PKCS12Attribute OPTIONAL
1120 }
1121
1122 -- Bag types
1123
1124
1125 pkcs-12-bagtypes OBJECT IDENTIFIER ::= {pkcs-12 10 1}
1126
1127 pkcs-12-keyBag OBJECT IDENTIFIER ::= {pkcs-12-bagtypes 1}
1128 pkcs-12-pkcs8ShroudedKeyBag OBJECT IDENTIFIER ::= {pkcs-12-bagtypes 2}
1129 pkcs-12-certBag OBJECT IDENTIFIER ::= {pkcs-12-bagtypes 3}
1130 pkcs-12-crlBag OBJECT IDENTIFIER ::= {pkcs-12-bagtypes 4}
1131
1132 pkcs-12-KeyBag ::= pkcs-8-PrivateKeyInfo
1133
1134 -- Shrouded KeyBag
1135
1136 pkcs-12-PKCS8ShroudedKeyBag ::= pkcs-8-EncryptedPrivateKeyInfo
1137
1138 -- CertBag
1139
1140 pkcs-12-CertBag ::= SEQUENCE {
1141         certId    OBJECT IDENTIFIER,
1142         certValue [0] EXPLICIT ANY DEFINED BY certId
1143 }
1144
1145 -- x509Certificate BAG-TYPE ::= {OCTET STRING IDENTIFIED BY {pkcs-9-certTypes 1}}
1146 -- DER-encoded X.509 certificate stored in OCTET STRING
1147
1148 pkcs-12-CRLBag ::= SEQUENCE {
1149         crlId           OBJECT IDENTIFIER,
1150         crlValue        [0] EXPLICIT ANY DEFINED BY crlId
1151 }
1152
1153 -- x509CRL BAG-TYPE ::=
1154 --      {OCTET STRING IDENTIFIED BY {pkcs-9-crlTypes 1}}
1155 -- DER-encoded X.509 CRL stored in OCTET STRING
1156
1157 pkcs-12-PKCS12Attribute ::= Attribute
1158
1159 -- PKCS #7 stuff (needed in PKCS 12)
1160
1161 pkcs-7-data OBJECT IDENTIFIER ::= { iso(1) member-body(2)
1162     us(840) rsadsi(113549) pkcs(1) pkcs7(7) 1 }
1163
1164 pkcs-7-encryptedData OBJECT IDENTIFIER ::= { iso(1) member-body(2)
1165     us(840) rsadsi(113549) pkcs(1) pkcs7(7) 6 }
1166
1167 pkcs-7-Data ::= OCTET STRING
1168
1169 pkcs-7-EncryptedData ::= SEQUENCE {
1170     version pkcs-7-CMSVersion,
1171     encryptedContentInfo pkcs-7-EncryptedContentInfo,
1172     unprotectedAttrs [1] IMPLICIT pkcs-7-UnprotectedAttributes OPTIONAL }
1173
1174 pkcs-7-EncryptedContentInfo ::= SEQUENCE {
1175     contentType pkcs-7-ContentType,
1176     contentEncryptionAlgorithm pkcs-7-ContentEncryptionAlgorithmIdentifier,
1177     encryptedContent [0] IMPLICIT pkcs-7-EncryptedContent OPTIONAL }
1178
1179 pkcs-7-ContentEncryptionAlgorithmIdentifier ::= AlgorithmIdentifier
1180
1181 pkcs-7-EncryptedContent ::= OCTET STRING
1182
1183 pkcs-7-UnprotectedAttributes ::= SET SIZE (1..MAX) OF Attribute
1184
1185 -- LDAP stuff
1186 -- may not be correct
1187
1188 id-at-ldap-DC AttributeType ::= { 0 9 2342 19200300 100 1 25 }
1189
1190 ldap-DC ::= IA5String
1191
1192 id-at-ldap-UID AttributeType ::= { 0 9 2342 19200300 100 1 1 }
1193
1194 ldap-UID ::= DirectoryString
1195
1196 -- rfc3039
1197
1198 id-pda  OBJECT IDENTIFIER ::= { id-pkix 9 }
1199
1200 id-pda-dateOfBirth          AttributeType ::= { id-pda 1 }
1201 DateOfBirth ::=             GeneralizedTime
1202
1203 id-pda-placeOfBirth         AttributeType ::= { id-pda 2 }
1204 PlaceOfBirth ::=            DirectoryString
1205
1206 id-pda-gender               AttributeType ::= { id-pda 3 }
1207 Gender ::=                  PrintableString (SIZE(1))
1208                             -- "M", "F", "m" or "f"
1209
1210 id-pda-countryOfCitizenship AttributeType ::= { id-pda 4 }
1211 CountryOfCitizenship ::=    PrintableString (SIZE (2))
1212                             -- ISO 3166 Country Code
1213
1214 id-pda-countryOfResidence   AttributeType ::= { id-pda 5 }
1215 CountryOfResidence ::=      PrintableString (SIZE (2))
1216                             -- ISO 3166 Country Code
1217
1218 -- rfc3820
1219
1220 id-pe-proxyCertInfo OBJECT IDENTIFIER ::= { id-pe 14 }
1221
1222 id-ppl-inheritAll OBJECT IDENTIFIER ::= { id-pkix 21 1 }
1223 id-ppl-independent OBJECT IDENTIFIER ::= { id-pkix 21 2 }
1224
1225 ProxyCertInfo ::= SEQUENCE {
1226         pCPathLenConstraint     INTEGER (0..MAX) OPTIONAL,
1227         proxyPolicy             ProxyPolicy }
1228
1229 ProxyPolicy ::= SEQUENCE {
1230         policyLanguage  OBJECT IDENTIFIER,
1231         policy          OCTET STRING OPTIONAL }
1232
1233 -- rfc3920 section 5.1.1
1234
1235 id-on  OBJECT IDENTIFIER ::= { id-pkix 8 }  -- other name forms
1236
1237 id-on-xmppAddr  OBJECT IDENTIFIER ::= { id-on 5 }
1238
1239 XmppAddr ::= UTF8String
1240
1241 END
1242
1243 -- Copyright (C) 2002-2014 Free Software Foundation, Inc.
1244 --
1245 -- This file is part of LIBTASN1.
1246 --
1247 -- This program is free software: you can redistribute it and/or modify
1248 -- it under the terms of the GNU General Public License as published by
1249 -- the Free Software Foundation, either version 3 of the License, or
1250 -- (at your option) any later version.
1251 --
1252 -- This program is distributed in the hope that it will be useful,
1253 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
1254 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1255 -- GNU General Public License for more details.
1256 --
1257 -- You should have received a copy of the GNU General Public License
1258 -- along with this program.  If not, see <http://www.gnu.org/licenses/>.