Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

201 lines
5.1 KiB

  1. --#comment "Copyright (C) Microsoft Corporation, 1996-1999. All rights reserved."--
  2. --#comment "ASN.1 definitions for PFXNSCP"--
  3. --#oid array-- -- object identifier is 16-node fixed array
  4. --#SS.basic lenptr-- -- set of and sequence of w/o size constraint
  5. --#SS.sized lenptr-- -- set of and sequence of w/ size constraint
  6. PFXNSCP
  7. DEFINITIONS IMPLICIT TAGS ::=
  8. BEGIN
  9. -------------------------------
  10. -- shorthand
  11. ObjectID ::= OBJECT IDENTIFIER --#oid array--
  12. ObjID ::= OBJECT IDENTIFIER
  13. Version ::= INTEGER {v1 (1)}
  14. -------------------------------
  15. -- from PKCS #7
  16. ContentType ::= ObjectID
  17. ContentInfo ::= SEQUENCE {
  18. contentType ContentType,
  19. content [0] EXPLICIT ANY OPTIONAL
  20. }
  21. RSAData ::= OCTET STRING --#public--
  22. -------------------------------
  23. -- from PKCS #8
  24. PrivateKeyInfo ::= SEQUENCE {
  25. version Version,
  26. privateKeyAlgorithm PrivateKeyAlgorithmIdentifier,
  27. privateKey OCTET STRING,
  28. attributes [0] IMPLICIT Attributes OPTIONAL
  29. } --#public--
  30. PrivateKeyAlgorithmIdentifier ::= AlgorithmIdentifier
  31. Attributes ::= SET --#public-- OF Attribute
  32. Attribute ::= ANY
  33. EncryptedPrivateKeyInfo ::= SEQUENCE {
  34. encryptionAlgorithm EncryptionAlgorithmIdentifier,
  35. encryptedData EncryptedData
  36. } --#public--
  37. EncryptionAlgorithmIdentifier ::= AlgorithmIdentifier
  38. EncryptedData ::= SEQUENCE {
  39. version Version,
  40. encryptedContentInfo EncryptedContentInfo
  41. } --#public--
  42. EncryptedContentInfo ::= SEQUENCE {
  43. contentType ContentType,
  44. contentEncryptionAlg ContentEncryptionAlgorithmIdentifier,
  45. encryptedContent [0] IMPLICIT EncryptedContent OPTIONAL
  46. }
  47. ContentEncryptionAlgorithmIdentifier ::= AlgorithmIdentifier
  48. EncryptedContent ::= OCTET STRING
  49. -------------------------------
  50. -- other pkcs
  51. AlgorithmIdentifier ::= SEQUENCE {
  52. algorithm ObjectID,
  53. parameters ANY DEFINED BY algorithm OPTIONAL
  54. }
  55. PBEParameter ::= SEQUENCE {
  56. salt OCTET STRING (SIZE(8)),
  57. iterationCount INTEGER
  58. } --#public--
  59. DigestInfo ::= SEQUENCE {
  60. digestAlgorithm DigestAlgorithmIdentifier,
  61. digest Digest
  62. }
  63. DigestAlgorithmIdentifier ::= AlgorithmIdentifier
  64. Digest ::= OCTET STRING
  65. -------------------------------
  66. -- imports
  67. rsa1 ObjID ::= { iso(1) member-body(2) us(840) rsadsi(113549) }
  68. pkcs-12 ObjID ::= { rsa1 pkcs(1) 12 }
  69. -------------------------------
  70. -- defines
  71. TransportMode ::= ObjID
  72. pkcs-12ModeIds ObjID ::= { pkcs-12 1 }
  73. off-lineTransportMode ObjID ::= { pkcs-12ModeIds 1 }
  74. PFX ::= SEQUENCE {
  75. macData [0] MacData OPTIONAL,
  76. authSafe [1] ContentInfo
  77. -- signedData in public-key integrity mode, and
  78. -- data in password integrity mode.
  79. } --#public--
  80. MacData ::= SEQUENCE {
  81. safeMAC DigestInfo,
  82. macSalt BIT STRING
  83. }
  84. AuthenticatedSafe ::= SEQUENCE {
  85. version Version DEFAULT v1,
  86. transportMode TransportMode DEFAULT off-lineTransportMode,
  87. privacySalt BIT STRING OPTIONAL,
  88. baggage Baggage OPTIONAL,
  89. -- Not subject to
  90. -- PFX encryption
  91. safe ContentInfo
  92. -- contentType is encryptedData in pwd privacy mode
  93. -- and envelopedData in pub key privacy mode
  94. } --#public--
  95. Baggage ::= SET OF BaggageItem
  96. BaggageItem ::= SEQUENCE {
  97. espvks SET OF ESPVK,
  98. unencryptedSecrets SET OF SafeBag
  99. }
  100. ESPVK ::= SEQUENCE {
  101. espvkObjID ObjID,
  102. espvkData PVKSupportingData,
  103. espvkCipherText [0] EXPLICIT ANY DEFINED BY espvkObjID
  104. } --#public--
  105. PVKSupportingData ::= SEQUENCE {
  106. assocCerts SET OF Thumbprint, -- zero or more
  107. regenerable BOOLEAN DEFAULT FALSE,
  108. nickname BMPString, -- unicode
  109. pvkAdditional PvkAdditional OPTIONAL
  110. } --#public--
  111. Thumbprint ::= DigestInfo
  112. PvkAdditional ::= SEQUENCE {
  113. pvkAdditionalType ObjID,
  114. pvkAdditionalContent [0] EXPLICIT ANY DEFINED BY pvkAdditionalType
  115. } --#public--
  116. SafeContents ::= SET --#public-- OF SafeBag
  117. SafeBag ::= SEQUENCE {
  118. safeBagType ObjID,
  119. safeBagContent ANY DEFINED BY safeBagType,
  120. safeBagName BMPString OPTIONAL
  121. } --#public--
  122. KeyBag ::= SET OF PrivateKey
  123. PrivateKey ::= SEQUENCE {
  124. pvkData PVKSupportingData,
  125. pkcs8data PrivateKeyInfo -- import from PKCS #8
  126. } --#public--
  127. CertCRLBag ::= SET --#public-- OF CertCRL
  128. CertCRL ::= SEQUENCE {
  129. bagId ObjID,
  130. value [0] EXPLICIT ANY DEFINED BY bagId
  131. } --#public--
  132. X509Bag ::= SEQUENCE {
  133. certOrCRL ContentInfo
  134. } --#public--
  135. SDSICertBag ::= SEQUENCE {
  136. value IA5String
  137. } --#public--
  138. SecretBag ::= SET OF Secret
  139. Secret ::= SEQUENCE {
  140. secretName BMPString, -- unicode
  141. secretType ObjID, -- ADDED MATTT, won't compile as spec 0.020 reads
  142. value ANY DEFINED BY secretType,
  143. secretAdditional SecretAdditional OPTIONAL
  144. } --#public--
  145. SecretAdditional ::= SEQUENCE {
  146. secretAdditionalType ObjID,
  147. secretAdditionalContent [0] EXPLICIT ANY DEFINED BY secretAdditionalType
  148. } --#public--
  149. END