home *** CD-ROM | disk | FTP | other *** search
/ ftp.rsa.com / 2014.05.ftp.rsa.com.tar / ftp.rsa.com / pub / pkcs / pkcs-12 / pkcs-12v1-1.asn < prev    next >
Text File  |  2014-05-02  |  5KB  |  183 lines

  1. -- PKCS #12 v1.1 ASN.1 Module
  2. -- Revised October 27, 2012
  3.  
  4. -- This module has been checked for conformance with the ASN.1 standard by
  5. -- the OSS ASN.1 Tools
  6.  
  7. PKCS-12 {
  8.     iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-12(12) modules(0)
  9.     pkcs-12(1)}
  10.  
  11. DEFINITIONS IMPLICIT TAGS ::=
  12.  
  13. BEGIN
  14.  
  15. -- EXPORTS ALL
  16. -- All types and values defined in this module are exported for use in other 
  17. -- ASN.1 modules.
  18.  
  19. IMPORTS
  20.  
  21. informationFramework
  22.     FROM UsefulDefinitions {joint-iso-itu-t(2) ds(5) module(1)
  23.                             usefulDefinitions(0) 3}
  24.  
  25. ATTRIBUTE
  26.     FROM InformationFramework informationFramework
  27.  
  28. ContentInfo, DigestInfo
  29.     FROM PKCS-7 {iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-7(7)
  30.                  modules(0) pkcs-7(1)}
  31.  
  32. PrivateKeyInfo, EncryptedPrivateKeyInfo
  33.     FROM PKCS-8 {iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-8(8)
  34.                  modules(1) pkcs-8(1)}
  35.  
  36. pkcs-9, friendlyName, localKeyId, certTypes, crlTypes
  37.     FROM PKCS-9 {iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
  38.                  modules(0) pkcs-9(1)};
  39.  
  40. -- ============================
  41. -- Object identifiers
  42. -- ============================
  43.  
  44.  
  45. rsadsi  OBJECT IDENTIFIER ::= {iso(1) member-body(2) us(840) rsadsi(113549)}
  46. pkcs    OBJECT IDENTIFIER ::= {rsadsi pkcs(1)}
  47. pkcs-12 OBJECT IDENTIFIER ::= {pkcs 12}
  48. pkcs-12PbeIds OBJECT IDENTIFIER ::= {pkcs-12 1}
  49. pbeWithSHAAnd128BitRC4          OBJECT IDENTIFIER ::= {pkcs-12PbeIds 1}
  50. pbeWithSHAAnd40BitRC4           OBJECT IDENTIFIER ::= {pkcs-12PbeIds 2}
  51. pbeWithSHAAnd3-KeyTripleDES-CBC OBJECT IDENTIFIER ::= {pkcs-12PbeIds 3}
  52. pbeWithSHAAnd2-KeyTripleDES-CBC OBJECT IDENTIFIER ::= {pkcs-12PbeIds 4}
  53. pbeWithSHAAnd128BitRC2-CBC      OBJECT IDENTIFIER ::= {pkcs-12PbeIds 5}
  54. pbewithSHAAnd40BitRC2-CBC       OBJECT IDENTIFIER ::= {pkcs-12PbeIds 6}
  55.  
  56. bagtypes OBJECT IDENTIFIER ::= {pkcs-12 10 1}
  57.  
  58. -- ============================
  59. -- The PFX PDU
  60. -- ============================
  61.  
  62. PFX ::= SEQUENCE {
  63.     version    INTEGER {v3(3)}(v3,...),
  64.     authSafe   ContentInfo,
  65.     macData    MacData OPTIONAL
  66. }
  67.  
  68. MacData ::= SEQUENCE {
  69.     mac        DigestInfo,
  70.     macSalt    OCTET STRING,
  71.     iterations INTEGER DEFAULT 1
  72.     -- Note: The default is for historical reasons and its use is deprecated.
  73. }
  74.  
  75. AuthenticatedSafe ::= SEQUENCE OF ContentInfo
  76.     -- Data if unencrypted
  77.     -- EncryptedData if password-encrypted
  78.     -- EnvelopedData if public key-encrypted
  79.  
  80. SafeContents ::= SEQUENCE OF SafeBag
  81.  
  82. SafeBag ::= SEQUENCE {
  83.     bagId         BAG-TYPE.&id ({PKCS12BagSet}),
  84.     bagValue      [0] EXPLICIT BAG-TYPE.&Type({PKCS12BagSet}{@bagId}),
  85.     bagAttributes SET OF PKCS12Attribute OPTIONAL
  86. }
  87.  
  88. -- ============================
  89. -- Bag types
  90. -- ============================
  91.  
  92. keyBag BAG-TYPE ::=
  93.     {KeyBag              IDENTIFIED BY {bagtypes 1}}
  94. pkcs8ShroudedKeyBag BAG-TYPE ::=
  95.     {PKCS8ShroudedKeyBag IDENTIFIED BY {bagtypes 2}}
  96. certBag BAG-TYPE ::=
  97.     {CertBag             IDENTIFIED BY {bagtypes 3}}
  98. crlBag BAG-TYPE ::=
  99.     {CRLBag              IDENTIFIED BY {bagtypes 4}}
  100. secretBag BAG-TYPE ::=
  101.     {SecretBag           IDENTIFIED BY {bagtypes 5}}
  102. safeContentsBag BAG-TYPE ::=
  103.     {SafeContents        IDENTIFIED BY {bagtypes 6}}
  104.  
  105. PKCS12BagSet BAG-TYPE ::= {
  106.     keyBag | 
  107.     pkcs8ShroudedKeyBag |
  108.     certBag |
  109.     crlBag | 
  110.     secretBag | 
  111.     safeContentsBag,
  112.     ... -- For future extensions
  113. }
  114.  
  115. BAG-TYPE ::= TYPE-IDENTIFIER
  116.  
  117. -- KeyBag
  118. KeyBag ::= PrivateKeyInfo
  119.  
  120. -- Shrouded KeyBag
  121. PKCS8ShroudedKeyBag ::= EncryptedPrivateKeyInfo
  122.  
  123. -- CertBag
  124. CertBag ::= SEQUENCE {
  125.     certId    BAG-TYPE.&id   ({CertTypes}),
  126.     certValue [0] EXPLICIT BAG-TYPE.&Type ({CertTypes}{@certId})
  127. }
  128.  
  129. x509Certificate BAG-TYPE ::=
  130.     {OCTET STRING IDENTIFIED BY {certTypes 1}}
  131.     -- DER-encoded X.509 certificate stored in OCTET STRING
  132. sdsiCertificate BAG-TYPE ::=
  133.     {IA5String IDENTIFIED BY {certTypes 2}}
  134.     -- Base64-encoded SDSI certificate stored in IA5String
  135.  
  136. CertTypes BAG-TYPE ::= {
  137.     x509Certificate |
  138.     sdsiCertificate,
  139.     ... -- For future extensions
  140. }
  141.  
  142. -- CRLBag
  143. CRLBag ::= SEQUENCE {
  144.     crlId     BAG-TYPE.&id ({CRLTypes}),
  145.     crltValue [0] EXPLICIT BAG-TYPE.&Type ({CRLTypes}{@crlId})
  146. }
  147.  
  148. x509CRL BAG-TYPE ::=
  149.     {OCTET STRING IDENTIFIED BY {crlTypes 1}}
  150.     -- DER-encoded X.509 CRL stored in OCTET STRING
  151.  
  152. CRLTypes BAG-TYPE ::= {
  153.     x509CRL,
  154.     ... -- For future extensions
  155. }
  156.  
  157. -- Secret Bag
  158. SecretBag ::= SEQUENCE {
  159.     secretTypeId  BAG-TYPE.&id ({SecretTypes}),
  160.     secretValue   [0] EXPLICIT BAG-TYPE.&Type ({SecretTypes}{@secretTypeId})
  161. }
  162.  
  163. SecretTypes BAG-TYPE ::= {
  164.     ... -- For future extensions
  165. }
  166.  
  167. -- ============================
  168. -- Attributes
  169. -- ============================
  170.  
  171. PKCS12Attribute ::= SEQUENCE {
  172.     attrId      ATTRIBUTE.&id ({PKCS12AttrSet}),
  173.     attrValues  SET OF ATTRIBUTE.&Type ({PKCS12AttrSet}{@attrId})
  174. } -- This type is compatible with the X.500 type 'Attribute'
  175.  
  176. PKCS12AttrSet ATTRIBUTE ::= {
  177.     friendlyName |
  178.     localKeyId,
  179.     ... -- Other attributes are allowed
  180. }
  181.  
  182. END
  183.