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.

95 lines
3.5 KiB

  1. ----------------------------------------------------------------------------
  2. -- X509.ASN
  3. --
  4. -- ASN.1 definitions for X509 v3 certificates
  5. ----------------------------------------------------------------------------
  6. --#comment "Copyright (C) Microsoft Corporation, 1996-1999. All rights reserved."--
  7. --#comment "ASN.1 definitions for X509 v3 certificates"--
  8. --#oid array-- -- object identifier is 16-node fixed array
  9. --#SS.basic lenptr-- -- set of and sequence of w/o size constraint
  10. --#SS.sized lenptr-- -- set of and sequence of w/ size constraint
  11. X509
  12. DEFINITIONS EXPLICIT TAGS ::=
  13. BEGIN
  14. HUGEINTEGER ::= INTEGER --#intx-- -- tag 0x02
  15. BITSTRING ::= BIT STRING --#lenptr-- --#nomemcpy-- -- tag 0x03
  16. OCTETSTRING ::= OCTET STRING --#lenptr-- --#nomemcpy-- -- tag 0x04
  17. NOCOPYANY ::= ANY --#nomemcpy--
  18. NUMERICSTRING ::= NumericString --#lenptr-- -- tag 0x12 (18)
  19. PRINTABLESTRING ::= PrintableString --#lenptr-- -- tag 0x13 (19)
  20. TELETEXSTRING ::= TeletexString --#lenptr-- -- tag 0x14 (20)
  21. T61STRING ::= T61String --#lenptr-- -- tag 0x14 (20)
  22. VIDEOTEXSTRING ::= VideotexString --#lenptr-- -- tag 0x15 (21)
  23. IA5STRING ::= IA5String --#lenptr-- -- tag 0x16 (22)
  24. GRAPHICSTRING ::= GraphicString --#lenptr-- -- tag 0x19 (25)
  25. VISIBLESTRING ::= VisibleString --#lenptr-- -- tag 0x1A (26)
  26. ISO646STRING ::= ISO646String --#lenptr-- -- tag 0x1A (26)
  27. GENERALSTRING ::= GeneralString --#lenptr-- -- tag 0x1B (27)
  28. UNIVERSALSTRING ::= UniversalString --#lenptr-- -- tag 0x1C (28)
  29. BMPSTRING ::= BMPString --#lenptr-- -- tag 0x1E (30)
  30. ObjectID ::= OBJECT IDENTIFIER --#oid array--
  31. --------------------------------------------
  32. -- Algorithm Identifier
  33. --------------------------------------------
  34. AlgorithmIdentifier ::= SEQUENCE {
  35. algorithm ObjectID,
  36. parameters NOCOPYANY OPTIONAL
  37. }
  38. --------------------------------------------
  39. -- Attributes
  40. --------------------------------------------
  41. Attribute ::= SEQUENCE {
  42. type ObjectID,
  43. values AttributeSetValue
  44. } --#public--
  45. AttributeSetValue ::= SET OF NOCOPYANY
  46. Attributes ::= SET OF Attribute
  47. --------------------------------------------
  48. -- Private Key types
  49. --------------------------------------------
  50. Version ::= INTEGER
  51. RSAPrivateKey ::= SEQUENCE {
  52. version Version,
  53. modulus HUGEINTEGER, -- n
  54. publicExponent INTEGER, -- e
  55. privateExponent HUGEINTEGER, -- d
  56. prime1 HUGEINTEGER, -- p
  57. prime2 HUGEINTEGER, -- q
  58. exponent1 HUGEINTEGER, -- d mod (p-1)
  59. exponent2 HUGEINTEGER, -- d mod (q-1)
  60. coefficient HUGEINTEGER -- (inverse of q) mod p
  61. } --#public--
  62. PrivateKeyAlgorithmIdentifier ::= AlgorithmIdentifier
  63. PrivateKey ::= OCTETSTRING
  64. PrivateKeyInfo ::= SEQUENCE {
  65. version Version,
  66. privateKeyAlgorithm PrivateKeyAlgorithmIdentifier,
  67. privateKey PrivateKey,
  68. privateKeyAttributes [0] IMPLICIT Attributes OPTIONAL
  69. } --#public--
  70. EncryptionAlgorithmIdentifier ::= AlgorithmIdentifier
  71. EncryptedData ::= OCTETSTRING
  72. EncryptedPrivateKeyInfo ::= SEQUENCE {
  73. encryptionAlgorithm EncryptionAlgorithmIdentifier,
  74. encryptedData EncryptedData
  75. } --#public--
  76. END