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.

161 lines
3.5 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1995.
  5. //
  6. // File: callback.h
  7. //
  8. // Contents:
  9. //
  10. // Classes:
  11. //
  12. // Functions:
  13. //
  14. // History: 09-23-97 jbanes Created
  15. //
  16. //----------------------------------------------------------------------------
  17. #define SECURITY_PACKAGE
  18. #include <secint.h>
  19. #define SCH_FLAG_READ_KEY 1
  20. #define SCH_FLAG_WRITE_KEY 2
  21. // Application process callbacks
  22. #define SCH_SIGNATURE_CALLBACK 1
  23. #define SCH_UPLOAD_CREDENTIAL_CALLBACK 2
  24. #define SCH_UPLOAD_CERT_STORE_CALLBACK 3
  25. #define SCH_ACQUIRE_CONTEXT_CALLBACK 4
  26. #define SCH_RELEASE_CONTEXT_CALLBACK 5
  27. #define SCH_DOWNLOAD_CERT_CALLBACK 6
  28. #define SCH_GET_USER_KEYS 7
  29. #define SCH_REFERENCE_MAPPER_CALLBACK 20
  30. #define SCH_GET_MAPPER_ISSUER_LIST_CALLBACK 21
  31. #define SCH_MAP_CREDENTIAL_CALLBACK 23
  32. #define SCH_CLOSE_LOCATOR_CALLBACK 25
  33. #define SCH_GET_MAPPER_ATTRIBUTES_CALLBACK 26
  34. typedef struct _SCH_CALLBACK_LIST
  35. {
  36. DWORD dwTag;
  37. PLSA_CALLBACK_FUNCTION pFunction;
  38. } SCH_CALLBACK_LIST;
  39. extern SCH_CALLBACK_LIST g_SchannelCallbacks[];
  40. extern DWORD g_cSchannelCallbacks;
  41. SECURITY_STATUS
  42. PerformApplicationCallback(
  43. DWORD dwCallback,
  44. ULONG_PTR dwArg1,
  45. ULONG_PTR dwArg2,
  46. SecBuffer *pInput,
  47. SecBuffer *pOutput,
  48. BOOL fExpectOutput);
  49. BOOL
  50. DuplicateApplicationHandle(
  51. HANDLE hAppHandle,
  52. LPHANDLE phLsaHandle);
  53. SECURITY_STATUS
  54. SerializeCertContext(
  55. PCCERT_CONTEXT pCertContext,
  56. PBYTE pbBuffer,
  57. PDWORD pcbBuffer);
  58. SECURITY_STATUS
  59. DeserializeCertContext(
  60. PCCERT_CONTEXT *ppCertContext,
  61. PBYTE pbBuffer,
  62. DWORD cbBuffer);
  63. NTSTATUS
  64. RemoteCryptAcquireContextW(
  65. HCRYPTPROV *phProv,
  66. LPCWSTR pwszContainer,
  67. LPCWSTR pwszProvider,
  68. DWORD dwProvType,
  69. DWORD dwFlags,
  70. DWORD dwCapiFlags);
  71. BOOL
  72. RemoteCryptReleaseContext(
  73. HCRYPTPROV hProv,
  74. DWORD dwFlags,
  75. DWORD dwCapiFlags);
  76. SP_STATUS
  77. SignHashUsingCallback(
  78. HCRYPTPROV hProv,
  79. DWORD dwKeySpec,
  80. ALG_ID aiHash,
  81. PBYTE pbHash,
  82. DWORD cbHash,
  83. PBYTE pbSignature,
  84. PDWORD pcbSignature,
  85. DWORD fHashData);
  86. SP_STATUS
  87. SPGetUserKeys(
  88. PSPContext pContext,
  89. DWORD dwFlags);
  90. SECURITY_STATUS
  91. GetClientAuthCertsCallback(
  92. ULONG_PTR Argument1,
  93. ULONG_PTR Argument2,
  94. SecBuffer *pInput,
  95. SecBuffer *pOutput);
  96. SECURITY_STATUS
  97. ReferenceMapperCallback(
  98. ULONG_PTR fReference,
  99. ULONG_PTR dwArg2,
  100. SecBuffer *pInput,
  101. SecBuffer *pOutput);
  102. SECURITY_STATUS
  103. GetMapperIssuerListCallback(
  104. ULONG_PTR pOutputBuffer,
  105. ULONG_PTR cbOutputBuffer,
  106. SecBuffer *pInput,
  107. SecBuffer *pOutput);
  108. SECURITY_STATUS
  109. MapCredentialCallback(
  110. ULONG_PTR dwCredentialType,
  111. ULONG_PTR dwArg2,
  112. SecBuffer *pInput,
  113. SecBuffer *pOutput);
  114. SECURITY_STATUS
  115. GetAccessTokenCallback(
  116. ULONG_PTR hLocator,
  117. ULONG_PTR dwArg2,
  118. SecBuffer *pInput,
  119. SecBuffer *pOutput);
  120. SECURITY_STATUS
  121. CloseLocatorCallback(
  122. ULONG_PTR hLocator,
  123. ULONG_PTR dwArg2,
  124. SecBuffer *pInput,
  125. SecBuffer *pOutput);
  126. VOID *
  127. PvExtVirtualAlloc(DWORD cb);
  128. SECURITY_STATUS
  129. FreeExtVirtualAlloc(PVOID pv, SIZE_T cbMem);
  130. SECURITY_STATUS
  131. SPFreeUserAllocMemory(PVOID pv, SIZE_T cbMem);
  132. SECURITY_STATUS
  133. QueryMappedCredAttributesCallback(
  134. ULONG_PTR hLocator,
  135. ULONG_PTR dwAttribute,
  136. SecBuffer *pInput,
  137. SecBuffer *pOutput);