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.

248 lines
8.1 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. VOID
  18. InitializeCipherMappings(VOID);
  19. VOID
  20. InitializeWellKnownKeys( VOID );
  21. SslGenRandom(
  22. DWORD cbRandom,
  23. PBYTE pbRandom);
  24. BSAFE_PUB_KEY *
  25. FindIssuerKey(
  26. PSTR pszIssuer);
  27. BOOL
  28. SslInitializeSessions( VOID );
  29. ///////////////////////////////////////////////////////
  30. //
  31. // Prototypes for SSL SSPI
  32. //
  33. ///////////////////////////////////////////////////////
  34. SECURITY_STATUS SEC_ENTRY
  35. SslAcquireCredentialsHandleW(
  36. SEC_WCHAR SEC_FAR * pszPrincipal, // Name of principal
  37. SEC_WCHAR SEC_FAR * pszPackageName, // Name of package
  38. unsigned long fCredentialUse, // Flags indicating use
  39. void SEC_FAR * pvLogonId, // Pointer to logon ID
  40. void SEC_FAR * pAuthData, // Package specific data
  41. SEC_GET_KEY_FN pGetKeyFn, // Pointer to GetKey() func
  42. void SEC_FAR * pvGetKeyArgument, // Value to pass to GetKey()
  43. PCredHandle phCredential, // (out) Cred Handle
  44. PTimeStamp ptsExpiry // (out) Lifetime (optional)
  45. );
  46. SECURITY_STATUS SEC_ENTRY
  47. SslAcquireCredentialsHandleA(
  48. SEC_CHAR SEC_FAR * pszPrincipal, // Name of principal
  49. SEC_CHAR SEC_FAR * pszPackageName, // Name of package
  50. unsigned long fCredentialUse, // Flags indicating use
  51. void SEC_FAR * pvLogonId, // Pointer to logon ID
  52. void SEC_FAR * pAuthData, // Package specific data
  53. SEC_GET_KEY_FN pGetKeyFn, // Pointer to GetKey() func
  54. void SEC_FAR * pvGetKeyArgument, // Value to pass to GetKey()
  55. PCredHandle phCredential, // (out) Cred Handle
  56. PTimeStamp ptsExpiry // (out) Lifetime (optional)
  57. );
  58. SECURITY_STATUS SEC_ENTRY
  59. SslFreeCredentialHandle(
  60. PCredHandle phCredential // Handle to free
  61. );
  62. SECURITY_STATUS SEC_ENTRY
  63. SslInitializeSecurityContextW(
  64. PCredHandle phCredential, // Cred to base context
  65. PCtxtHandle phContext, // Existing context (OPT)
  66. SEC_WCHAR SEC_FAR * pszTargetName, // Name of target
  67. unsigned long fContextReq, // Context Requirements
  68. unsigned long Reserved1, // Reserved, MBZ
  69. unsigned long TargetDataRep, // Data rep of target
  70. PSecBufferDesc pInput, // Input Buffers
  71. unsigned long Reserved2, // Reserved, MBZ
  72. PCtxtHandle phNewContext, // (out) New Context handle
  73. PSecBufferDesc pOutput, // (inout) Output Buffers
  74. unsigned long SEC_FAR * pfContextAttr, // (out) Context attrs
  75. PTimeStamp ptsExpiry // (out) Life span (OPT)
  76. );
  77. SECURITY_STATUS SEC_ENTRY
  78. SslInitializeSecurityContextA(
  79. PCredHandle phCredential, // Cred to base context
  80. PCtxtHandle phContext, // Existing context (OPT)
  81. SEC_CHAR SEC_FAR * pszTargetName, // Name of target
  82. unsigned long fContextReq, // Context Requirements
  83. unsigned long Reserved1, // Reserved, MBZ
  84. unsigned long TargetDataRep, // Data rep of target
  85. PSecBufferDesc pInput, // Input Buffers
  86. unsigned long Reserved2, // Reserved, MBZ
  87. PCtxtHandle phNewContext, // (out) New Context handle
  88. PSecBufferDesc pOutput, // (inout) Output Buffers
  89. unsigned long SEC_FAR * pfContextAttr, // (out) Context attrs
  90. PTimeStamp ptsExpiry // (out) Life span (OPT)
  91. );
  92. SECURITY_STATUS SEC_ENTRY
  93. SslAcceptSecurityContext(
  94. PCredHandle phCredential, // Cred to base context
  95. PCtxtHandle phContext, // Existing context (OPT)
  96. PSecBufferDesc pInput, // Input buffer
  97. unsigned long fContextReq, // Context Requirements
  98. unsigned long TargetDataRep, // Target Data Rep
  99. PCtxtHandle phNewContext, // (out) New context handle
  100. PSecBufferDesc pOutput, // (inout) Output buffers
  101. unsigned long SEC_FAR * pfContextAttr, // (out) Context attributes
  102. PTimeStamp ptsExpiry // (out) Life span (OPT)
  103. );
  104. SECURITY_STATUS SEC_ENTRY
  105. SslDeleteSecurityContext(
  106. PCtxtHandle phContext // Context to delete
  107. );
  108. SECURITY_STATUS SEC_ENTRY
  109. SslApplyControlToken(
  110. PCtxtHandle phContext, // Context to modify
  111. PSecBufferDesc pInput // Input token to apply
  112. );
  113. SECURITY_STATUS SEC_ENTRY
  114. SslEnumerateSecurityPackagesW(
  115. unsigned long SEC_FAR * pcPackages, // Receives num. packages
  116. PSecPkgInfoW SEC_FAR * ppPackageInfo // Receives array of info
  117. );
  118. SECURITY_STATUS SEC_ENTRY
  119. SslEnumerateSecurityPackagesA(
  120. unsigned long SEC_FAR * pcPackages, // Receives num. packages
  121. PSecPkgInfoA SEC_FAR * ppPackageInfo // Receives array of info
  122. );
  123. SECURITY_STATUS SEC_ENTRY
  124. SslQuerySecurityPackageInfoW(
  125. SEC_WCHAR SEC_FAR * pszPackageName, // Name of package
  126. PSecPkgInfoW * ppPackageInfo // Receives package info
  127. );
  128. SECURITY_STATUS SEC_ENTRY
  129. SslQuerySecurityPackageInfoA(
  130. SEC_CHAR SEC_FAR * pszPackageName, // Name of package
  131. PSecPkgInfoA * ppPackageInfo // Receives package info
  132. );
  133. SECURITY_STATUS SEC_ENTRY
  134. SslFreeContextBuffer(
  135. void SEC_FAR * pvContextBuffer
  136. );
  137. SECURITY_STATUS SEC_ENTRY
  138. SslQueryCredentialsAttributesW(
  139. PCredHandle phCredential,
  140. ULONG ulAttribute,
  141. PVOID pBuffer
  142. );
  143. SECURITY_STATUS SEC_ENTRY
  144. SslCompleteAuthToken(
  145. PCtxtHandle phContext, // Context to complete
  146. PSecBufferDesc pToken // Token to complete
  147. );
  148. SECURITY_STATUS SEC_ENTRY
  149. SslImpersonateSecurityContext(
  150. PCtxtHandle phContext // Context to impersonate
  151. );
  152. SECURITY_STATUS SEC_ENTRY
  153. SslRevertSecurityContext(
  154. PCtxtHandle phContext // Context from which to re
  155. );
  156. SECURITY_STATUS SEC_ENTRY
  157. SslQueryContextAttributesW(
  158. PCtxtHandle phContext, // Context to query
  159. unsigned long ulAttribute, // Attribute to query
  160. void SEC_FAR * pBuffer // Buffer for attributes
  161. );
  162. SECURITY_STATUS SEC_ENTRY
  163. SslQueryContextAttributesA(
  164. PCtxtHandle phContext, // Context to query
  165. unsigned long ulAttribute, // Attribute to query
  166. void SEC_FAR * pBuffer // Buffer for attributes
  167. );
  168. SECURITY_STATUS SEC_ENTRY
  169. SslMakeSignature(
  170. PCtxtHandle phContext,
  171. DWORD fQOP,
  172. PSecBufferDesc pMessage,
  173. ULONG MessageSeqNo
  174. );
  175. SECURITY_STATUS SEC_ENTRY
  176. SslVerifySignature(
  177. PCtxtHandle phContext,
  178. PSecBufferDesc pMessage,
  179. ULONG MessageSeqNo,
  180. DWORD * pfQOP
  181. );
  182. SECURITY_STATUS SEC_ENTRY
  183. SslSealMessage(
  184. PCtxtHandle phContext,
  185. DWORD fQOP,
  186. PSecBufferDesc pMessage,
  187. ULONG MessageSeqNo
  188. );
  189. SECURITY_STATUS SEC_ENTRY
  190. SslUnsealMessage(
  191. PCtxtHandle phContext,
  192. PSecBufferDesc pMessage,
  193. ULONG MessageSeqNo,
  194. DWORD * pfQOP
  195. );