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.

87 lines
1.9 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1996 - 1999
  6. //
  7. // File: pvk.h
  8. //
  9. // Contents: Shared types and functions
  10. //
  11. // APIs:
  12. //
  13. // History: 12-May-96 philh created
  14. //--------------------------------------------------------------------------
  15. #ifndef __PVK_H__
  16. #define __PVK_H__
  17. #include "pvkhlpr.h"
  18. #include "pvkdlgs.h"
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22. //+-------------------------------------------------------------------------
  23. // Pvk allocation and free routines
  24. //--------------------------------------------------------------------------
  25. void *PvkAlloc(
  26. IN size_t cbBytes
  27. );
  28. void PvkFree(
  29. IN void *pv
  30. );
  31. //+-------------------------------------------------------------------------
  32. // Enter or Create Private Key Password Dialog Box
  33. //--------------------------------------------------------------------------
  34. enum PASSWORD_TYPE {
  35. ENTER_PASSWORD = 0,
  36. CREATE_PASSWORD
  37. };
  38. BOOL WINAPI PvkDllMain(
  39. HMODULE hInstDLL,
  40. DWORD fdwReason,
  41. LPVOID lpvReserved
  42. );
  43. BOOL
  44. WINAPI
  45. PrivateKeySave(
  46. IN HCRYPTPROV hCryptProv,
  47. IN HANDLE hFile,
  48. IN DWORD dwKeySpec, // either AT_SIGNATURE or AT_KEYEXCHANGE
  49. IN HWND hwndOwner,
  50. IN LPCWSTR pwszKeyName,
  51. IN DWORD dwFlags
  52. );
  53. BOOL
  54. WINAPI
  55. PrivateKeyLoad(
  56. IN HCRYPTPROV hCryptProv,
  57. IN HANDLE hFile,
  58. IN HWND hwndOwner,
  59. IN LPCWSTR pwszKeyName,
  60. IN DWORD dwFlags,
  61. IN OUT OPTIONAL DWORD *pdwKeySpec
  62. );
  63. int PvkDlgGetKeyPassword(
  64. IN PASSWORD_TYPE PasswordType,
  65. IN HWND hwndOwner,
  66. IN LPCWSTR pwszKeyName,
  67. OUT BYTE **ppbPassword,
  68. OUT DWORD *pcbPassword
  69. );
  70. #ifdef __cplusplus
  71. } // Balance extern "C" above
  72. #endif
  73. #endif