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.

258 lines
8.6 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1995.
  5. //
  6. // File: protos.h
  7. //
  8. // Contents:
  9. //
  10. // Classes:
  11. //
  12. // Functions:
  13. //
  14. // History: 8-08-95 RichardW Created
  15. //
  16. //----------------------------------------------------------------------------
  17. SECURITY_STATUS PctTranslateError(SP_STATUS spRet);
  18. ///////////////////////////////////////////////////////
  19. //
  20. // Prototypes for PCT SSPI
  21. //
  22. ///////////////////////////////////////////////////////
  23. SECURITY_STATUS SEC_ENTRY
  24. AcquireCredentialsHandleW(
  25. SEC_WCHAR SEC_FAR * pszPrincipal, // Name of principal
  26. SEC_WCHAR SEC_FAR * pszPackageName, // Name of package
  27. unsigned long fCredentialUse, // Flags indicating use
  28. void SEC_FAR * pvLogonId, // Pointer to logon ID
  29. void SEC_FAR * pAuthData, // Package specific data
  30. SEC_GET_KEY_FN pGetKeyFn, // Pointer to GetKey() func
  31. void SEC_FAR * pvGetKeyArgument, // Value to pass to GetKey()
  32. PCredHandle phCredential, // (out) Cred Handle
  33. PTimeStamp ptsExpiry // (out) Lifetime (optional)
  34. );
  35. SECURITY_STATUS SEC_ENTRY
  36. AcquireCredentialsHandleA(
  37. SEC_CHAR SEC_FAR * pszPrincipal, // Name of principal
  38. SEC_CHAR SEC_FAR * pszPackageName, // Name of package
  39. unsigned long fCredentialUse, // Flags indicating use
  40. void SEC_FAR * pvLogonId, // Pointer to logon ID
  41. void SEC_FAR * pAuthData, // Package specific data
  42. SEC_GET_KEY_FN pGetKeyFn, // Pointer to GetKey() func
  43. void SEC_FAR * pvGetKeyArgument, // Value to pass to GetKey()
  44. PCredHandle phCredential, // (out) Cred Handle
  45. PTimeStamp ptsExpiry // (out) Lifetime (optional)
  46. );
  47. SECURITY_STATUS SEC_ENTRY
  48. FreeCredentialsHandle(
  49. PCredHandle phCredential // Handle to free
  50. );
  51. SECURITY_STATUS SEC_ENTRY
  52. InitializeSecurityContextW(
  53. PCredHandle phCredential, // Cred to base context
  54. PCtxtHandle phContext, // Existing context (OPT)
  55. SEC_WCHAR SEC_FAR * pszTargetName, // Name of target
  56. unsigned long fContextReq, // Context Requirements
  57. unsigned long Reserved1, // Reserved, MBZ
  58. unsigned long TargetDataRep, // Data rep of target
  59. PSecBufferDesc pInput, // Input Buffers
  60. unsigned long Reserved2, // Reserved, MBZ
  61. PCtxtHandle phNewContext, // (out) New Context handle
  62. PSecBufferDesc pOutput, // (inout) Output Buffers
  63. unsigned long SEC_FAR * pfContextAttr, // (out) Context attrs
  64. PTimeStamp ptsExpiry // (out) Life span (OPT)
  65. );
  66. SECURITY_STATUS SEC_ENTRY
  67. InitializeSecurityContextA(
  68. PCredHandle phCredential, // Cred to base context
  69. PCtxtHandle phContext, // Existing context (OPT)
  70. SEC_CHAR SEC_FAR * pszTargetName, // Name of target
  71. unsigned long fContextReq, // Context Requirements
  72. unsigned long Reserved1, // Reserved, MBZ
  73. unsigned long TargetDataRep, // Data rep of target
  74. PSecBufferDesc pInput, // Input Buffers
  75. unsigned long Reserved2, // Reserved, MBZ
  76. PCtxtHandle phNewContext, // (out) New Context handle
  77. PSecBufferDesc pOutput, // (inout) Output Buffers
  78. unsigned long SEC_FAR * pfContextAttr, // (out) Context attrs
  79. PTimeStamp ptsExpiry // (out) Life span (OPT)
  80. );
  81. SECURITY_STATUS SEC_ENTRY
  82. AcceptSecurityContext(
  83. PCredHandle phCredential, // Cred to base context
  84. PCtxtHandle phContext, // Existing context (OPT)
  85. PSecBufferDesc pInput, // Input buffer
  86. unsigned long fContextReq, // Context Requirements
  87. unsigned long TargetDataRep, // Target Data Rep
  88. PCtxtHandle phNewContext, // (out) New context handle
  89. PSecBufferDesc pOutput, // (inout) Output buffers
  90. unsigned long SEC_FAR * pfContextAttr, // (out) Context attributes
  91. PTimeStamp ptsExpiry // (out) Life span (OPT)
  92. );
  93. SECURITY_STATUS SEC_ENTRY
  94. CompleteAuthToken(
  95. PCtxtHandle phContext, // Context to complete
  96. PSecBufferDesc pToken // Token to complete
  97. );
  98. SECURITY_STATUS SEC_ENTRY
  99. DeleteSecurityContext(
  100. PCtxtHandle phContext // Context to delete
  101. );
  102. SECURITY_STATUS SEC_ENTRY
  103. ApplyControlToken(
  104. PCtxtHandle phContext, // Context to modify
  105. PSecBufferDesc pInput // Input token to apply
  106. );
  107. SECURITY_STATUS SEC_ENTRY
  108. EnumerateSecurityPackagesW(
  109. unsigned long SEC_FAR * pcPackages, // Receives num. packages
  110. PSecPkgInfoW SEC_FAR * ppPackageInfo // Receives array of info
  111. );
  112. SECURITY_STATUS SEC_ENTRY
  113. EnumerateSecurityPackagesA(
  114. unsigned long SEC_FAR * pcPackages, // Receives num. packages
  115. PSecPkgInfoA SEC_FAR * ppPackageInfo // Receives array of info
  116. );
  117. SECURITY_STATUS SEC_ENTRY
  118. QuerySecurityPackageInfoW(
  119. SEC_WCHAR SEC_FAR * pszPackageName, // Name of package
  120. PSecPkgInfoW * ppPackageInfo // Receives package info
  121. );
  122. SECURITY_STATUS SEC_ENTRY
  123. QuerySecurityPackageInfoA(
  124. SEC_CHAR SEC_FAR * pszPackageName, // Name of package
  125. PSecPkgInfoA * ppPackageInfo // Receives package info
  126. );
  127. SECURITY_STATUS SEC_ENTRY
  128. FreeContextBuffer(
  129. void SEC_FAR * pvContextBuffer
  130. );
  131. SECURITY_STATUS SEC_ENTRY
  132. QueryCredentialsAttributesW(
  133. PCredHandle phCredential,
  134. ULONG ulAttribute,
  135. PVOID pBuffer
  136. );
  137. SECURITY_STATUS SEC_ENTRY
  138. ImpersonateSecurityContext(
  139. PCtxtHandle phContext // Context to impersonate
  140. );
  141. SECURITY_STATUS SEC_ENTRY
  142. RevertSecurityContext(
  143. PCtxtHandle phContext // Context from which to re
  144. );
  145. SECURITY_STATUS SEC_ENTRY
  146. QueryContextAttributesW(
  147. PCtxtHandle phContext, // Context to query
  148. unsigned long ulAttribute, // Attribute to query
  149. void SEC_FAR * pBuffer // Buffer for attributes
  150. );
  151. SECURITY_STATUS SEC_ENTRY
  152. QueryContextAttributesA(
  153. PCtxtHandle phContext, // Context to query
  154. unsigned long ulAttribute, // Attribute to query
  155. void SEC_FAR * pBuffer // Buffer for attributes
  156. );
  157. SECURITY_STATUS SEC_ENTRY
  158. MakeSignature(
  159. PCtxtHandle phContext,
  160. DWORD fQOP,
  161. PSecBufferDesc pMessage,
  162. ULONG MessageSeqNo
  163. );
  164. SECURITY_STATUS SEC_ENTRY
  165. VerifySignature(
  166. PCtxtHandle phContext,
  167. PSecBufferDesc pMessage,
  168. ULONG MessageSeqNo,
  169. DWORD * pfQOP
  170. );
  171. SECURITY_STATUS SEC_ENTRY
  172. SealMessage(
  173. PCtxtHandle phContext,
  174. DWORD fQOP,
  175. PSecBufferDesc pMessage,
  176. ULONG MessageSeqNo
  177. );
  178. SECURITY_STATUS SEC_ENTRY
  179. UnsealMessage(
  180. PCtxtHandle phContext,
  181. PSecBufferDesc pMessage,
  182. ULONG MessageSeqNo,
  183. DWORD * pfQOP
  184. );
  185. PSPContext
  186. ValidateContextHandle(PCtxtHandle phContext);
  187. PSPCredentialGroup
  188. ValidateCredentialHandle(
  189. PCredHandle phCred);
  190. SECURITY_STATUS SEC_ENTRY
  191. SetContextAttributesW(
  192. PCtxtHandle phContext, // Context to Set
  193. unsigned long ulAttribute, // Attribute to Set
  194. void SEC_FAR * pBuffer, // Buffer for attributes
  195. unsigned long cbBuffer // Size (in bytes) of Buffer
  196. );
  197. SECURITY_STATUS SEC_ENTRY
  198. SetContextAttributesA(
  199. PCtxtHandle phContext, // Context to Set
  200. unsigned long ulAttribute, // Attribute to Set
  201. void SEC_FAR * pBuffer, // Buffer for attributes
  202. unsigned long cbBuffer // Size (in bytes) of Buffer
  203. );