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.

125 lines
5.3 KiB

  1. //depot/Lab03_N/DS/security/inc/keysvcc.h#8 - edit change 8790 (text)
  2. //depot/Lab03_N/DS/security/inc/keysvcc.h#5 - edit change 6380 (text)
  3. //+-------------------------------------------------------------------------
  4. //
  5. // Microsoft Windows
  6. //
  7. // Copyright (C) Microsoft Corporation, 1997 - 1999
  8. //
  9. // File: keysvcc.h
  10. //
  11. //--------------------------------------------------------------------------
  12. #ifndef __keysvcc_h__
  13. #define __keysvcc_h__
  14. #ifdef __cplusplus
  15. extern "C"{
  16. #endif
  17. #define KEYSVC_DEFAULT_ENDPOINT TEXT("\\pipe\\keysvc")
  18. #define KEYSVC_DEFAULT_PROT_SEQ TEXT("ncacn_np")
  19. #define KEYSVC_LOCAL_ENDPOINT TEXT("keysvc")
  20. #define KEYSVC_LOCAL_PROT_SEQ TEXT("ncalrpc")
  21. #define KEYSVC_LEGACY_ENDPOINT TEXT("\\pipe\\ntsvcs")
  22. #define KEYSVC_LEGACY_PROT_SEQ TEXT("ncacn_np")
  23. typedef void *KEYSVCC_HANDLE;
  24. /****************************************
  25. * Client API for Key Service
  26. ****************************************/
  27. ULONG KeyOpenKeyService(
  28. /* [in] */ LPSTR pszMachineName,
  29. /* [in] */ KEYSVC_TYPE ulOwnerType,
  30. /* [in] */ LPWSTR pwszOwnerName,
  31. /* [in] */ void *pAuthentication,
  32. /* [out][in] */ void *pReserved,
  33. /* [out] */ KEYSVCC_HANDLE *phKeySvcCli);
  34. ULONG KeyCloseKeyService(
  35. /* [in] */ KEYSVCC_HANDLE hKeySvcCli,
  36. /* [out][in] */ void *pReserved);
  37. ULONG KeyEnroll_V2(
  38. /* [in] */ KEYSVCC_HANDLE hKeySvcCli,
  39. /* [in] */ LPSTR pszMachineName, //IN Required: name of the remote machine
  40. /* [in] */ BOOL fKeyService, //IN Required: Whether the function is called remotely
  41. /* [in] */ DWORD dwPurpose, //IN Required: Indicates type of request - enroll/renew
  42. /* [in] */ DWORD dwFlags, //IN Required: Flags for enrollment
  43. /* [in] */ LPWSTR pwszAcctName, //IN Optional: Account name the service runs under
  44. /* [in] */ void *pAuthentication, //RESERVED must be NULL
  45. /* [in] */ BOOL fEnroll, //IN Required: Whether it is enrollment or renew
  46. /* [in] */ LPWSTR pwszCALocation, //IN Required: The ca machine names to attempt to enroll with
  47. /* [in] */ LPWSTR pwszCAName, //IN Required: The ca names to attempt to enroll with
  48. /* [in] */ BOOL fNewKey, //IN Required: Set the TRUE if new private key is needed
  49. /* [in] */ PCERT_REQUEST_PVK_NEW pKeyNew, //IN Required: The private key information
  50. /* [in] */ CERT_BLOB *pCert, //IN Optional: The old certificate if renewing
  51. /* [in] */ PCERT_REQUEST_PVK_NEW pRenewKey, //IN Optional: The new private key information
  52. /* [in] */ LPWSTR pwszHashAlg, //IN Optional: The hash algorithm
  53. /* [in] */ LPWSTR pwszDesStore, //IN Optional: The destination store
  54. /* [in] */ DWORD dwStoreFlags, //IN Optional: Flags for cert store.
  55. /* [in] */ PCERT_ENROLL_INFO pRequestInfo, //IN Required: The information about the cert request
  56. /* [in] */ LPWSTR pwszAttributes, //IN Optional: Attribute string for request
  57. /* [in] */ DWORD dwReservedFlags, //RESERVED must be 0
  58. /* [in] */ BYTE *pReserved, //RESERVED must be NULL
  59. /* [in][out] */ HANDLE *phRequest, //IN OUT Optional: A handle to a created request
  60. /* [out] */ CERT_BLOB *pPKCS7Blob, //OUT Optional: The PKCS7 from the CA
  61. /* [out] */ CERT_BLOB *pHashBlob, //OUT Optioanl: The SHA1 hash of the enrolled/renewed certificate
  62. /* [out] */ DWORD *pdwStatus); //OUT Optional: The status of the enrollment/renewal
  63. ULONG KeyEnumerateAvailableCertTypes(
  64. /* [in] */ KEYSVCC_HANDLE hKeySvcCli,
  65. /* [out][in] */ void *pReserved,
  66. /* [out][in] */ ULONG *pcCertTypeCount,
  67. /* [in, out][size_is(,*pcCertTypeCount)] */
  68. PKEYSVC_UNICODE_STRING *ppCertTypes);
  69. ULONG KeyEnumerateCAs(
  70. /* [in] */ KEYSVCC_HANDLE hKeySvcCli,
  71. /* [out][in] */ void *pReserved,
  72. /* [in] */ ULONG ulFlags,
  73. /* [out][in] */ ULONG *pcCACount,
  74. /* [in, out][size_is(,*pcCACount)] */
  75. PKEYSVC_UNICODE_STRING *ppCAs);
  76. ULONG KeyQueryRequestStatus
  77. (/* [in] */ KEYSVCC_HANDLE hKeySvcCli,
  78. /* [in] */ HANDLE hRequest,
  79. /* [out, ref] */ CRYPTUI_WIZ_QUERY_CERT_REQUEST_INFO *pQueryInfo);
  80. ULONG RKeyOpenKeyService
  81. ( /* [in] */ LPSTR pszMachineName,
  82. /* [in] */ KEYSVC_TYPE OwnerType,
  83. /* [in] */ LPWSTR pwszOwnerName,
  84. /* [in] */ void *pAuthentication,
  85. /* [out][in] */ void *pReserved,
  86. /* [out] */ KEYSVCC_HANDLE *phKeySvcCli);
  87. ULONG RKeyCloseKeyService
  88. (/* [in] */ KEYSVCC_HANDLE hKeySvcCli,
  89. /* [out][in] */ void *pReserved);
  90. ULONG RKeyPFXInstall
  91. (/* [in] */ KEYSVCC_HANDLE hKeySvcCli,
  92. /* [in] */ PKEYSVC_BLOB pPFX,
  93. /* [in] */ PKEYSVC_UNICODE_STRING pPassword,
  94. /* [in] */ ULONG ulFlags);
  95. #ifdef __cplusplus
  96. }
  97. #endif
  98. #endif