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.

382 lines
13 KiB

  1. --
  2. -- GlobalDirectives.ASN
  3. --
  4. --#comment "Copyright (C) Microsoft Corporation, 1996-1999. All rights reserved."--
  5. --#comment "ASN.1 definitions for GlobalDirectives"--
  6. --#oid array-- -- object identifier is 16-node fixed array
  7. --#SS.basic lenptr-- -- set of and sequence of w/o size constraint
  8. --#SS.sized lenptr-- -- set of and sequence of w/ size constraint
  9. PKCS
  10. DEFINITIONS EXPLICIT TAGS ::=
  11. BEGIN
  12. ObjectID ::= OBJECT IDENTIFIER --#public-- --#oid array--
  13. Any ::= ANY
  14. ObjectIdentifierType ::= ObjectID --#public--
  15. OctetStringType ::= OCTET STRING --#public--
  16. IntegerType ::= INTEGER --#public--
  17. HugeIntegerType ::= INTEGER --#intx-- --#public--
  18. BitStringType ::= BIT STRING --#lenptr--
  19. ------------------------------------------------------------------------------
  20. AlgorithmIdentifier ::= SEQUENCE {
  21. algorithm ObjectID,
  22. parameters ANY --#field "parameters"-- OPTIONAL
  23. } --#public--
  24. AlgorithmIdentifierNC2 ::= SEQUENCE {
  25. algorithm ObjectID,
  26. parameters ANY --#nomemcpy-- --#field "parameters"-- OPTIONAL
  27. } --#public--
  28. DigestInfo ::= SEQUENCE {
  29. digestAlgorithm DigestAlgorithmIdentifier,
  30. digest Digest
  31. } --#public--
  32. DigestAlgorithmIdentifier ::= AlgorithmIdentifier
  33. Digest ::= OCTET STRING
  34. CertificateRevocationList ::= ANY -- hacked from X.509
  35. CertificateRevocationListNC ::= ANY --#nomemcpy--
  36. CertificateSerialNumber ::= HugeIntegerType -- copied from X.509
  37. Name ::= ANY -- hacked from X.509
  38. Certificate ::= ANY -- hacked from PKCS-6
  39. CertificateNC ::= ANY --#nomemcpy--
  40. AlgorithmIdentifiers ::= SET --#public-- OF AlgorithmIdentifier
  41. AttributeSetValue ::= SET --#public-- OF ANY
  42. AttributeSetValueNC ::= SET --#public-- OF ANY --#nomemcpy--
  43. AlgorithmIdentifierNC ::= ANY --#nomemcpy--
  44. DigestAlgorithmIdentifierNC ::= AlgorithmIdentifierNC
  45. SetOfAny ::= SET --#public-- OF ANY
  46. Attribute ::= SEQUENCE { -- hacked from X.509
  47. attributeType ObjectID,
  48. attributeValue AttributeSetValue }
  49. AttributeNC2 ::= SEQUENCE {
  50. attributeType ObjectID,
  51. attributeValue AttributeSetValueNC } --#public--
  52. AttributeNC ::= ANY --#nomemcpy--
  53. Attributes ::= SET --#public-- OF Attribute -- hacked from X.509
  54. AttributesNC ::= SET --#public-- --#type "AttributesNC"-- OF AttributeNC
  55. AttributesNC2 ::= SET --#public-- --#type "AttributesNC2"-- OF AttributeNC2
  56. CertificateRevocationLists ::=
  57. SET --#type "Crls"--
  58. OF CertificateRevocationList
  59. CertificateRevocationListsNC ::=
  60. SET --#public-- --#type "CrlsNC"--
  61. OF CertificateRevocationListNC
  62. ContentEncryptionAlgId ::= AlgorithmIdentifier
  63. ContentEncryptionAlgIdNC ::= AlgorithmIdentifierNC
  64. DigestEncryptionAlgId ::= AlgorithmIdentifier -- X.509
  65. DigestEncryptionAlgIdNC ::= AlgorithmIdentifierNC2
  66. Certificates ::=
  67. SET --#type "Certificates"--
  68. OF Certificate
  69. CertificatesNC ::=
  70. SET --#public-- --#type "CertificatesNC"--
  71. OF CertificateNC
  72. IssuerAndSerialNumber ::= SEQUENCE {
  73. issuer Name, -- X.509
  74. serialNumber CertificateSerialNumber -- X.509
  75. } --#public--
  76. KeyEncryptionAlgId ::= AlgorithmIdentifier
  77. ContentType ::= ObjectID
  78. ContentInfo ::= SEQUENCE {
  79. contentType ContentType,
  80. content [0] EXPLICIT ANY --#field "content"-- --#value "content"-- OPTIONAL
  81. } --#public--
  82. ContentInfoNC ::= SEQUENCE {
  83. contentType ContentType,
  84. content [0] EXPLICIT ANY --#nomemcpy-- --#field "content"-- --#value "content"-- OPTIONAL
  85. } --#public--
  86. Data ::= OCTET STRING
  87. SignedData ::= SEQUENCE {
  88. version INTEGER,
  89. digestAlgorithms DigestAlgorithmIdentifiers,
  90. contentInfo ContentInfo,
  91. certificates [0] IMPLICIT Certificates OPTIONAL,
  92. crls [1] IMPLICIT CertificateRevocationLists OPTIONAL,
  93. signerInfos SignerInfos
  94. } --#public--
  95. DigestAlgorithmIdentifiers ::=
  96. SET OF DigestAlgorithmIdentifier -- PKCS-1
  97. DigestAlgorithmIdentifiersNC ::=
  98. SET --#public-- --#type "DigestAlgorithmIdentifiersNC"-- OF DigestAlgorithmIdentifierNC
  99. SignerInfos ::= SET --#public-- OF SignerInfo
  100. SignerInfo ::= SEQUENCE {
  101. version INTEGER,
  102. -- sid may only be issuerAndSerialNumber or subjectKeyIdentifier
  103. sid CertIdentifier,
  104. digestAlgorithm DigestAlgorithmIdentifier, -- PKCS-1
  105. authenticatedAttributes [0] IMPLICIT Attributes OPTIONAL,
  106. digestEncryptionAlgorithm DigestEncryptionAlgId,
  107. encryptedDigest EncryptedDigest,
  108. unauthenticatedAttributes [1] IMPLICIT Attributes
  109. --#field "unauthAttributes"-- OPTIONAL
  110. } --#public--
  111. DigestAlgorithmBlobs ::= SET --#public-- OF DigestAlgorithmBlob
  112. DigestAlgorithmBlob ::= ANY --#nomemcpy--
  113. SignedDataWithBlobs ::= SEQUENCE {
  114. version INTEGER,
  115. digestAlgorithms DigestAlgorithmIdentifiersNC,
  116. contentInfo ContentInfoNC,
  117. certificates [0] IMPLICIT CertificatesNC OPTIONAL,
  118. crls [1] IMPLICIT CertificateRevocationListsNC OPTIONAL,
  119. signerInfos SignerInfosNC
  120. } --#public--
  121. SignerInfosNC ::= SET --#public-- OF ANY --#nomemcpy--
  122. SignerInfoWithAABlobs ::= SET OF SignerInfoWithAABlob
  123. SignerInfoWithAABlob ::= SEQUENCE {
  124. version ANY --#nomemcpy--,
  125. sid ANY --#nomemcpy--,
  126. digestAlgorithm ANY --#nomemcpy--,
  127. authenticatedAttributes ANY --#nomemcpy--,
  128. digestEncryptionAlgorithm ANY --#nomemcpy--,
  129. encryptedDigest ANY --#nomemcpy--,
  130. unauthenticatedAttributes [1] IMPLICIT AttributesNC
  131. --#field "dummyUAAs"-- OPTIONAL
  132. } --#public--
  133. SignerInfoWithAttrBlobs ::= SEQUENCE {
  134. version ANY --#nomemcpy--,
  135. sid ANY --#nomemcpy--,
  136. digestAlgorithm ANY --#nomemcpy--,
  137. authenticatedAttributes [0] IMPLICIT AttributesNC
  138. --#field "authAttributes"-- OPTIONAL,
  139. digestEncryptionAlgorithm DigestEncryptionAlgIdNC,
  140. encryptedDigest ANY --#nomemcpy--,
  141. unauthenticatedAttributes [1] IMPLICIT AttributesNC
  142. --#field "unauthAttributes"-- OPTIONAL
  143. } --#public--
  144. SignerInfoWithBlobs ::= SEQUENCE {
  145. version INTEGER,
  146. sid CertIdentifierNC,
  147. digestAlgorithm DigestAlgorithmIdentifierNC,
  148. authenticatedAttributes [0] IMPLICIT AttributesNC2
  149. --#field "authAttributes"-- OPTIONAL,
  150. digestEncryptionAlgorithm DigestEncryptionAlgIdNC,
  151. encryptedDigest EncryptedDigestNC,
  152. unauthenticatedAttributes [1] IMPLICIT AttributesNC2
  153. --#field "unauthAttributes"-- OPTIONAL
  154. } --#public--
  155. EncryptedDigest ::= OCTET STRING
  156. EncryptedDigestNC ::= OCTET STRING --#nomemcpy--
  157. EnvelopedData ::= SEQUENCE {
  158. version INTEGER,
  159. recipientInfos RecipientInfos,
  160. encryptedContentInfo EncryptedContentInfo
  161. } --#public--
  162. RecipientInfos ::= SET --#public-- OF RecipientInfo
  163. EncryptedContentInfo ::= SEQUENCE {
  164. contentType ContentType,
  165. contentEncryptionAlgorithm ContentEncryptionAlgId,
  166. encryptedContent [0] IMPLICIT EncryptedContent OPTIONAL
  167. } --#public--
  168. EncryptedContent ::= OCTET STRING
  169. RecipientInfo ::= SEQUENCE {
  170. version INTEGER,
  171. issuerAndSerialNumber IssuerAndSerialNumber,
  172. keyEncryptionAlgorithm KeyEncryptionAlgId,
  173. encryptedKey EncryptedKey
  174. } --#public--
  175. EncryptedKey ::= OctetStringType
  176. SignedAndEnvelopedData ::= SEQUENCE {
  177. version INTEGER,
  178. recipientInfos RecipientInfos,
  179. digestAlgorithms DigestAlgorithmIdentifiers,
  180. encryptedContentInfo EncryptedContentInfo,
  181. certificates [0] IMPLICIT Certificates OPTIONAL,
  182. crls [1] IMPLICIT CertificateRevocationLists OPTIONAL,
  183. signerInfos SignerInfos
  184. } --#public--
  185. DigestedData ::= SEQUENCE {
  186. version INTEGER,
  187. digestAlgorithm DigestAlgorithmIdentifier,
  188. contentInfo ContentInfo,
  189. digest Digest
  190. } --#public--
  191. EncryptedData ::= SEQUENCE {
  192. version INTEGER,
  193. encryptedContentInfo EncryptedContentInfo
  194. } --#public--
  195. --------------------------------------------
  196. -- CMS Changes
  197. --------------------------------------------
  198. --------------------------------------------
  199. -- New Cert Identifier
  200. --------------------------------------------
  201. CertIdentifier ::= CHOICE {
  202. issuerAndSerialNumber IssuerAndSerialNumber
  203. --#field "issuerAndSerialNumber"--,
  204. subjectKeyIdentifier [0] IMPLICIT SubjectKeyIdentifier
  205. --#field "subjectKeyIdentifier"--
  206. } --#public--
  207. CertIdentifierNC ::= ANY --#nomemcpy--
  208. SubjectKeyIdentifier ::= OctetStringType
  209. --------------------------------------------
  210. -- New CMS version of EnvelopedData
  211. --------------------------------------------
  212. CmsEnvelopedData ::= SEQUENCE {
  213. version INTEGER,
  214. originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
  215. recipientInfos CmsRecipientInfos,
  216. encryptedContentInfo EncryptedContentInfo,
  217. unprotectedAttrs [1] IMPLICIT Attributes OPTIONAL
  218. } --#public--
  219. OriginatorInfo ::= SEQUENCE {
  220. certificates [0] IMPLICIT Certificates OPTIONAL,
  221. crls [1] IMPLICIT CertificateRevocationLists OPTIONAL
  222. } --#public--
  223. OriginatorInfoNC ::= SEQUENCE {
  224. certificates [0] IMPLICIT CertificatesNC OPTIONAL,
  225. crls [1] IMPLICIT CertificateRevocationListsNC OPTIONAL
  226. } --#public--
  227. --------------------------------------------
  228. -- New CMS version of RecipientInfos
  229. --------------------------------------------
  230. CmsRecipientInfos ::= SET --#public-- OF CmsRecipientInfo
  231. CmsRecipientInfo ::= CHOICE {
  232. keyTransRecipientInfo KeyTransRecipientInfo,
  233. keyAgreeRecipientInfo [1] IMPLICIT KeyAgreeRecipientInfo,
  234. mailListRecipientInfo [2] IMPLICIT MailListRecipientInfo
  235. } --#public--
  236. --------------------------------------------
  237. -- Key Transport RecipientInfo
  238. --------------------------------------------
  239. KeyTransRecipientInfo ::= SEQUENCE {
  240. version INTEGER, -- always set to 0 or 2
  241. -- rid may only be issuerAndSerialNumber or subjectKeyIdentifier
  242. rid CertIdentifier,
  243. keyEncryptionAlgorithm KeyEncryptionAlgId,
  244. encryptedKey EncryptedKey
  245. } --#public--
  246. --------------------------------------------
  247. -- Key Agreement RecipientInfo
  248. --------------------------------------------
  249. KeyAgreeRecipientInfo ::= SEQUENCE {
  250. version INTEGER, -- always set to 3
  251. -- originatorCert may only be issuerAndSerialNumber or subjectKeyIdentifier
  252. originator [0] EXPLICIT OriginatorIdentifierOrKey,
  253. ukm [1] EXPLICIT UserKeyingMaterial OPTIONAL,
  254. keyEncryptionAlgorithm KeyEncryptionAlgId,
  255. recipientEncryptedKeys RecipientEncryptedKeys
  256. } --#public--
  257. OriginatorIdentifierOrKey ::= CHOICE {
  258. issuerAndSerialNumber IssuerAndSerialNumber
  259. --#field "issuerAndSerialNumber"--,
  260. subjectKeyIdentifier [0] IMPLICIT SubjectKeyIdentifier
  261. --#field "subjectKeyIdentifier"--,
  262. originatorKey [1] IMPLICIT OriginatorPublicKey
  263. }
  264. OriginatorPublicKey ::= SEQUENCE {
  265. algorithm AlgorithmIdentifier,
  266. publicKey BitStringType
  267. }
  268. RecipientEncryptedKeys ::= SEQUENCE OF RecipientEncryptedKey
  269. UserKeyingMaterial ::= OctetStringType
  270. RecipientEncryptedKey ::= SEQUENCE {
  271. rid RecipientIdentifier,
  272. encryptedKey EncryptedKey
  273. }
  274. RecipientIdentifier ::= CHOICE {
  275. issuerAndSerialNumber IssuerAndSerialNumber
  276. --#field "issuerAndSerialNumber"--,
  277. rKeyId [0] IMPLICIT RecipientKeyIdentifier
  278. }
  279. RecipientKeyIdentifier ::= SEQUENCE {
  280. subjectKeyIdentifier SubjectKeyIdentifier,
  281. date GeneralizedTime
  282. --#field "date"-- OPTIONAL,
  283. other OtherKeyAttribute
  284. --#field "other"-- OPTIONAL
  285. }
  286. OtherKeyAttribute ::= SEQUENCE {
  287. keyAttrId ObjectID,
  288. keyAttr ANY OPTIONAL
  289. }
  290. --------------------------------------------
  291. -- Mail List RecipientInfo
  292. --------------------------------------------
  293. MailListRecipientInfo ::= SEQUENCE {
  294. version INTEGER, -- always set to 4
  295. mlid MailListKeyIdentifier,
  296. keyEncryptionAlgorithm KeyEncryptionAlgId,
  297. encryptedKey EncryptedKey
  298. } --#public--
  299. MailListKeyIdentifier ::= SEQUENCE {
  300. kekIdentifier OctetStringType,
  301. date GeneralizedTime
  302. --#field "date"-- OPTIONAL,
  303. other OtherKeyAttribute
  304. --#field "other"-- OPTIONAL
  305. }
  306. END