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.

163 lines
4.0 KiB

  1. //#----------------------------------------------------------------------------
  2. //
  3. // File: sspspm.h
  4. //
  5. // Synopsis: Definitions specific to SSPI SPM DLL.
  6. //
  7. // Copyright (C) 1995 Microsoft Corporation. All Rights Reserved.
  8. //
  9. // Authors: LucyC Created 25 Sept 1995
  10. //
  11. //-----------------------------------------------------------------------------
  12. #ifndef _SSPSPM_H_
  13. #define _SSPSPM_H_
  14. #include <platform.h>
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. //
  19. // Names of secruity DLL
  20. //
  21. #define SSP_SPM_NT_DLL "security.dll"
  22. #define SSP_SPM_WIN95_DLL "secur32.dll"
  23. #define SSP_SPM_UNIX_DLL "secur32.dll"
  24. #define SSP_SPM_DLL_NAME_SIZE 16 // max. length of security DLL names
  25. #define MAX_SSPI_PKG 32 // Max. no. of SSPI supported
  26. #define SSPPKG_ERROR ((UCHAR) 0xff)
  27. #define SSPPKG_NO_PKG SSPPKG_ERROR
  28. #define MAX_AUTH_MSG_SIZE 10000
  29. #define TCP_PRINT fprintf
  30. #define DBG_CONTEXT stderr
  31. #define MAX_BLOB_SIZE 13000
  32. //
  33. // Server host list definition.
  34. // This list contains server hosts which do not use MSN authentication.
  35. // The following defines an entry in the server host list.
  36. //
  37. typedef struct _ssp_host_list
  38. {
  39. struct _ssp_host_list *pNext;
  40. unsigned char *pHostname; // name of server host
  41. unsigned char pkgID; // the package being used for this host
  42. } SspHosts, *PSspHosts;
  43. //
  44. // List of SSPI packages installed on this machine.
  45. // The following defines an entry of the SSPI package list.
  46. //
  47. typedef struct _ssp_auth_pkg
  48. {
  49. LPTSTR pName; // package name
  50. DWORD Capabilities ; // Interesting capabilities bit
  51. ULONG cbMaxToken; // max size of security token
  52. } SSPAuthPkg, *PSSPAuthPkg;
  53. #define SSPAUTHPKG_SUPPORT_NTLM_CREDS 0x00000001
  54. //
  55. // The following defines the global data structure which the SPM DLL keeps
  56. // in the HTSPM structure.
  57. //
  58. typedef struct _ssp_htspm
  59. {
  60. PSecurityFunctionTable pFuncTbl;
  61. SSPAuthPkg **PkgList; // array of pointers to auth packages
  62. UCHAR PkgCnt;
  63. UCHAR MsnPkg; // Index to MSN pkg in the pkg list
  64. BOOLEAN bKeepList; // whether to keep a list of servers
  65. // which use non-MSN SSPI packages
  66. PSspHosts pHostlist;
  67. } SspData, *PSspData;
  68. #define SPM_STATUS_OK 0
  69. #define SPM_ERROR 1
  70. #define SPM_STATUS_WOULD_BLOCK 2
  71. #define SPM_STATUS_INSUFFICIENT_BUFFER 3
  72. /////////////////////////////////////////////////////////////////////////////
  73. //
  74. // Function headers from sspcalls.c
  75. //
  76. /////////////////////////////////////////////////////////////////////////////
  77. DWORD
  78. GetSecAuthMsg (
  79. PSspData pData,
  80. PCredHandle pCredential,
  81. DWORD pkgID, // the package index into package list
  82. PCtxtHandle pInContext,
  83. PCtxtHandle pOutContext,
  84. ULONG fContextReq, // Request Flags
  85. VOID *pBuffIn,
  86. DWORD cbBuffIn,
  87. char *pFinalBuff,
  88. DWORD *pcbBuffOut,
  89. SEC_CHAR *pszTarget, // Server Host Name
  90. UINT bNonBlock,
  91. LPSTR pszScheme,
  92. PCSTR lpszUrl,
  93. SECURITY_STATUS *pssResult
  94. );
  95. INT
  96. GetPkgId(LPTSTR lpszPkgName);
  97. DWORD
  98. GetPkgCapabilities(
  99. INT Package
  100. );
  101. ULONG
  102. GetPkgMaxToken(
  103. INT Package
  104. );
  105. /////////////////////////////////////////////////////////////////////////////
  106. //
  107. // Function headers from buffspm.c
  108. //
  109. /////////////////////////////////////////////////////////////////////////////
  110. PSspHosts
  111. SspSpmNewHost (
  112. PSspData pData,
  113. UCHAR *pHost, // name of server host to be added
  114. UCHAR Package
  115. );
  116. VOID
  117. SspSpmDeleteHost(
  118. SspData *pData,
  119. PSspHosts pDelHost
  120. );
  121. VOID
  122. SspSpmTrashHostList(
  123. SspData *pData
  124. );
  125. PSspHosts
  126. SspSpmGetHost(
  127. PSspData pData,
  128. UCHAR *pHost
  129. );
  130. #ifdef __cplusplus
  131. } // end extern "C" {
  132. #endif
  133. #endif /* _SSPSPM_H_ */