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.

148 lines
3.5 KiB

  1. //****************************************************************************
  2. //
  3. // Microsoft NT Remote Access Service
  4. //
  5. // Copyright 1992-93
  6. //
  7. //
  8. // Revision History
  9. //
  10. //
  11. // 11/14/97 Shirish Koti Created
  12. //
  13. //
  14. // Description: This file contains all structure and constant definitions for
  15. // the subauthentication package used by ARAP, MD5 and SFM
  16. //
  17. //****************************************************************************
  18. #ifndef _RASSFMSUBAUTH_
  19. #define _RASSFMSUBAUTH_
  20. //
  21. // Get id for our subauthentication package - MSV1_0_SUBAUTHENTICATION_DLL_RAS
  22. //
  23. #include <ntmsv1_0.h>
  24. //
  25. // Defines for those protocols that need subauthentication at the PDC
  26. //
  27. enum RAS_SUBAUTH_PROTO
  28. {
  29. RAS_SUBAUTH_PROTO_ARAP = 1,
  30. RAS_SUBAUTH_PROTO_MD5CHAP = 2,
  31. RAS_SUBAUTH_PROTO_MD5CHAP_EX = 3,
  32. RAS_SUBAUTH_PROTO_UNKNOWN = 99
  33. };
  34. typedef enum RAS_SUBAUTH_PROTO RAS_SUBAUTH_PROTO;
  35. typedef struct _RAS_SUBAUTH_INFO
  36. {
  37. RAS_SUBAUTH_PROTO ProtocolType;
  38. DWORD DataSize;
  39. UCHAR Data[1];
  40. } RAS_SUBAUTH_INFO, *PRAS_SUBAUTH_INFO;
  41. //
  42. // The RAS_SUBAUTH_INFO 'Data' for ProtocolType RAS_SUBAUTH_PROTO_MD5CHAP.
  43. //
  44. typedef struct
  45. _MD5CHAP_SUBAUTH_INFO
  46. {
  47. // The packet sequence number of the challenge sent to peer. PPP CHAP
  48. // includes this in the hashed information.
  49. //
  50. UCHAR uchChallengeId;
  51. // The challenge sent to peer.
  52. //
  53. UCHAR uchChallenge[ 16 ];
  54. // The challenge response received from peer.
  55. //
  56. UCHAR uchResponse[ 16 ];
  57. }
  58. MD5CHAP_SUBAUTH_INFO;
  59. //
  60. // The RAS_SUBAUTH_INFO 'Data' for ProtocolType RAS_SUBAUTH_PROTO_MD5CHAP_EX.
  61. //
  62. typedef struct _MD5CHAP_EX_SUBAUTH_INFO
  63. {
  64. // The packet sequence number of the challenge sent to peer. PPP CHAP
  65. // includes this in the hashed information.
  66. //
  67. UCHAR uchChallengeId;
  68. // The challenge response received from peer.
  69. //
  70. UCHAR uchResponse[ 16 ];
  71. // The challenge sent to peer.
  72. //
  73. UCHAR uchChallenge[ 1 ];
  74. } MD5CHAP_EX_SUBAUTH_INFO;
  75. #define MAX_ARAP_USER_NAMELEN 32
  76. #define MAX_MAC_PWD_LEN 8
  77. #define ARAP_SUBAUTH_LOGON_PKT 1
  78. #define ARAP_SUBAUTH_CHGPWD_PKT 2
  79. #define SFM_SUBAUTH_CHGPWD_PKT 3
  80. #define SFM_SUBAUTH_LOGON_PKT 4
  81. #define SFM_2WAY_SUBAUTH_LOGON_PKT ARAP_SUBAUTH_LOGON_PKT
  82. typedef struct _ARAP_CHALLENGE
  83. {
  84. DWORD high;
  85. DWORD low;
  86. } ARAP_CHALLENGE, *PARAP_CHALLENGE;
  87. typedef struct _ARAP_SUBAUTH_REQ
  88. {
  89. DWORD PacketType;
  90. union
  91. {
  92. struct
  93. {
  94. DWORD fGuestLogon;
  95. DWORD NTChallenge1;
  96. DWORD NTChallenge2;
  97. DWORD MacResponse1;
  98. DWORD MacResponse2;
  99. DWORD MacChallenge1;
  100. DWORD MacChallenge2;
  101. DWORD NTResponse1;
  102. DWORD NTResponse2;
  103. LARGE_INTEGER PasswdCreateDate;
  104. LARGE_INTEGER PasswdExpireDate;
  105. } Logon;
  106. struct
  107. {
  108. WCHAR UserName[MAX_ARAP_USER_NAMELEN+1];
  109. UCHAR OldMunge[MAX_ARAP_USER_NAMELEN+1];
  110. UCHAR NewMunge[MAX_ARAP_USER_NAMELEN+1];
  111. } ChgPwd;
  112. };
  113. } ARAP_SUBAUTH_REQ, *PARAP_SUBAUTH_REQ;
  114. //
  115. // NOTE: make sure this structure size doesn't exceed 16 because of our
  116. // workaround in using SessionKey of MSV1_0_VALIDATION_INFO structure
  117. //
  118. typedef struct _ARAP_SUBAUTH_RESP
  119. {
  120. DWORD Result;
  121. ARAP_CHALLENGE Response;
  122. } ARAP_SUBAUTH_RESP, *PARAP_SUBAUTH_RESP;
  123. #endif