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.

132 lines
3.2 KiB

  1. #ifndef _SPNEGO_Module_H_
  2. #define _SPNEGO_Module_H_
  3. #include "msber.h"
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. typedef struct MechTypeList * PMechTypeList;
  8. typedef ASN1objectidentifier_t MechType;
  9. typedef PMechTypeList SavedMechTypeList;
  10. #define SavedMechTypeList_PDU 0
  11. #define SIZE_SPNEGO_Module_PDU_0 sizeof(SavedMechTypeList)
  12. typedef ASN1bitstring_t ContextFlags;
  13. #define delegFlag 0x80
  14. #define mutualFlag 0x40
  15. #define replayFlag 0x20
  16. #define sequenceFlag 0x10
  17. #define anonFlag 0x8
  18. #define confFlag 0x4
  19. #define integFlag 0x2
  20. typedef ASN1octetstring_t MechSpecInfo;
  21. typedef enum NegResult {
  22. accept_completed = 0,
  23. accept_incomplete = 1,
  24. reject = 2,
  25. } NegResult;
  26. typedef struct MechTypeList {
  27. PMechTypeList next;
  28. MechType value;
  29. } MechTypeList_Element;
  30. typedef struct NegHints {
  31. union {
  32. ASN1uint16_t bit_mask;
  33. ASN1octet_t o[1];
  34. };
  35. # define hintName_present 0x80
  36. ASN1ztcharstring_t hintName;
  37. # define hintAddress_present 0x40
  38. ASN1octetstring_t hintAddress;
  39. } NegHints;
  40. typedef struct NegTokenInit {
  41. union {
  42. ASN1uint16_t bit_mask;
  43. ASN1octet_t o[1];
  44. };
  45. # define NegTokenInit_mechTypes_present 0x80
  46. PMechTypeList mechTypes;
  47. # define NegTokenInit_reqFlags_present 0x40
  48. ContextFlags reqFlags;
  49. # define NegTokenInit_mechToken_present 0x20
  50. ASN1octetstring_t mechToken;
  51. # define NegTokenInit_negHints_present 0x10
  52. NegHints negHints;
  53. # define NegTokenInit_mechListMIC_present 0x8
  54. ASN1octetstring_t mechListMIC;
  55. } NegTokenInit;
  56. typedef struct NegTokenInit2 {
  57. union {
  58. ASN1uint16_t bit_mask;
  59. ASN1octet_t o[1];
  60. };
  61. # define NegTokenInit2_mechTypes_present 0x80
  62. PMechTypeList mechTypes;
  63. # define NegTokenInit2_reqFlags_present 0x40
  64. ContextFlags reqFlags;
  65. # define NegTokenInit2_mechToken_present 0x20
  66. ASN1octetstring_t mechToken;
  67. # define NegTokenInit2_mechListMIC_present 0x10
  68. ASN1octetstring_t mechListMIC;
  69. # define NegTokenInit2_negHints_present 0x8
  70. NegHints negHints;
  71. } NegTokenInit2;
  72. typedef struct NegTokenTarg {
  73. union {
  74. ASN1uint16_t bit_mask;
  75. ASN1octet_t o[1];
  76. };
  77. # define negResult_present 0x80
  78. NegResult negResult;
  79. # define supportedMech_present 0x40
  80. MechType supportedMech;
  81. # define responseToken_present 0x20
  82. ASN1octetstring_t responseToken;
  83. # define NegTokenTarg_mechListMIC_present 0x10
  84. ASN1octetstring_t mechListMIC;
  85. } NegTokenTarg;
  86. typedef struct NegotiationToken {
  87. ASN1choice_t choice;
  88. union {
  89. # define negTokenInit_chosen 1
  90. NegTokenInit negTokenInit;
  91. # define negTokenTarg_chosen 2
  92. NegTokenTarg negTokenTarg;
  93. # define negTokenInit2_chosen 3
  94. NegTokenInit2 negTokenInit2;
  95. } u;
  96. } NegotiationToken;
  97. #define NegotiationToken_PDU 1
  98. #define SIZE_SPNEGO_Module_PDU_1 sizeof(NegotiationToken)
  99. typedef struct InitialNegToken {
  100. MechType spnegoMech;
  101. NegotiationToken negToken;
  102. } InitialNegToken;
  103. #define InitialNegToken_PDU 2
  104. #define SIZE_SPNEGO_Module_PDU_2 sizeof(InitialNegToken)
  105. extern ASN1module_t SPNEGO_Module;
  106. extern void ASN1CALL SPNEGO_Module_Startup(void);
  107. extern void ASN1CALL SPNEGO_Module_Cleanup(void);
  108. /* Prototypes of element functions for SEQUENCE OF and SET OF constructs */
  109. #ifdef __cplusplus
  110. } /* extern "C" */
  111. #endif
  112. #endif /* _SPNEGO_Module_H_ */