Leaked source code of windows server 2003
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.

104 lines
2.4 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. typedef struct _SCH_CALLBACK_LIST
  30. {
  31. DWORD dwTag;
  32. PLSA_CALLBACK_FUNCTION pFunction;
  33. } SCH_CALLBACK_LIST;
  34. extern SCH_CALLBACK_LIST g_SchannelCallbacks[];
  35. extern DWORD g_cSchannelCallbacks;
  36. SECURITY_STATUS
  37. PerformApplicationCallback(
  38. DWORD dwCallback,
  39. ULONG_PTR dwArg1,
  40. ULONG_PTR dwArg2,
  41. SecBuffer *pInput,
  42. SecBuffer *pOutput,
  43. BOOL fExpectOutput);
  44. BOOL
  45. DuplicateApplicationHandle(
  46. HANDLE hAppHandle,
  47. LPHANDLE phLsaHandle);
  48. SECURITY_STATUS
  49. SerializeCertContext(
  50. PCCERT_CONTEXT pCertContext,
  51. PBYTE pbBuffer,
  52. PDWORD pcbBuffer);
  53. SECURITY_STATUS
  54. DeserializeCertContext(
  55. PCCERT_CONTEXT *ppCertContext,
  56. PBYTE pbBuffer,
  57. DWORD cbBuffer);
  58. NTSTATUS
  59. RemoteCryptAcquireContextW(
  60. HCRYPTPROV *phProv,
  61. LPCWSTR pwszContainer,
  62. LPCWSTR pwszProvider,
  63. DWORD dwProvType,
  64. DWORD dwFlags);
  65. BOOL
  66. RemoteCryptReleaseContext(
  67. HCRYPTPROV hProv,
  68. DWORD dwFlags);
  69. SP_STATUS
  70. SignHashUsingCallback(
  71. HCRYPTPROV hProv,
  72. DWORD dwKeySpec,
  73. ALG_ID aiHash,
  74. PBYTE pbHash,
  75. DWORD cbHash,
  76. PBYTE pbSignature,
  77. PDWORD pcbSignature,
  78. DWORD fHashData);
  79. SP_STATUS
  80. SPGetUserKeys(
  81. PSPContext pContext,
  82. DWORD dwFlags);
  83. VOID *
  84. PvExtVirtualAlloc(DWORD cb);
  85. SECURITY_STATUS
  86. FreeExtVirtualAlloc(PVOID pv, SIZE_T cbMem);
  87. SECURITY_STATUS
  88. SPFreeUserAllocMemory(PVOID pv, SIZE_T cbMem);