Leaked source code of windows server 2003
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.

86 lines
2.4 KiB

  1. /***************************************************/
  2. /* Copyright (C) Microsoft Corporation, 1996 - 1999*/
  3. /***************************************************/
  4. /* Abstract syntax: keygen */
  5. /* Created: Mon Jan 27 13:51:10 1997 */
  6. /* ASN.1 compiler version: 4.2 Beta B */
  7. /* Target operating system: Windows NT 3.5 or later/Windows 95 */
  8. /* Target machine type: Intel x86 */
  9. /* C compiler options required: -Zp8 (Microsoft) or equivalent */
  10. /* ASN.1 compiler options specified:
  11. * -listingfile keygen.lst -noshortennames -1990 -noconstraints
  12. */
  13. #ifndef OSS_keygen
  14. #define OSS_keygen
  15. #include "asn1hdr.h"
  16. #include "asn1code.h"
  17. #define RSAPublicKey_PDU 1
  18. #define SubjectPublicKeyInfo_PDU 2
  19. #define SignedContent_PDU 3
  20. #define SignedPublicKeyAndChallenge_PDU 4
  21. typedef struct ObjectID {
  22. unsigned short count;
  23. unsigned long value[16];
  24. } ObjectID;
  25. typedef struct HUGEINTEGER {
  26. unsigned int length;
  27. unsigned char *value;
  28. } HUGEINTEGER;
  29. typedef struct BITSTRING {
  30. unsigned int length; /* number of significant bits */
  31. unsigned char *value;
  32. } BITSTRING;
  33. typedef struct IA5STRING {
  34. unsigned int length;
  35. char *value;
  36. } IA5STRING;
  37. typedef struct AlgorithmIdentifier {
  38. unsigned char bit_mask;
  39. # define parameters_present 0x80
  40. ObjectID algorithm;
  41. OpenType parameters; /* optional */
  42. } AlgorithmIdentifier;
  43. typedef struct RSAPublicKey {
  44. HUGEINTEGER modulus;
  45. int publicExponent;
  46. } RSAPublicKey;
  47. typedef struct SubjectPublicKeyInfo {
  48. AlgorithmIdentifier algorithm;
  49. BITSTRING subjectPublicKey;
  50. } SubjectPublicKeyInfo;
  51. typedef struct SignedContent {
  52. OpenType toBeSigned;
  53. AlgorithmIdentifier algorithm;
  54. BITSTRING signature;
  55. } SignedContent;
  56. typedef struct PublicKeyAndChallenge {
  57. SubjectPublicKeyInfo spki;
  58. IA5STRING challenge;
  59. } PublicKeyAndChallenge;
  60. typedef struct _bit1 {
  61. unsigned int length; /* number of significant bits */
  62. unsigned char *value;
  63. } _bit1;
  64. typedef struct SignedPublicKeyAndChallenge {
  65. PublicKeyAndChallenge publicKeyAndChallenge;
  66. AlgorithmIdentifier signatureAlgorithm;
  67. _bit1 signature;
  68. } SignedPublicKeyAndChallenge;
  69. extern void *keygen; /* encoder-decoder control table */
  70. #endif /* OSS_keygen */