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.

76 lines
1.9 KiB

  1. //+--------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1996 - 1999
  5. //
  6. // File: cscsp.h
  7. //
  8. // Contents: Cert Server CSP routines.
  9. //
  10. //---------------------------------------------------------------------------
  11. #ifndef __CSCSP_H__
  12. #define __CSCSP_H__
  13. HRESULT
  14. myGetCertSrvCSP(
  15. IN BOOL fEncryptionCSP,
  16. IN WCHAR const *pwszCAName,
  17. OUT DWORD *pdwProvType,
  18. OUT WCHAR **ppwszProvName,
  19. OUT ALG_ID *pidAlg,
  20. OUT BOOL *pfMachineKeyset,
  21. OPTIONAL OUT DWORD *pdwKeySize);
  22. BOOL
  23. myCertSrvCryptAcquireContext(
  24. OUT HCRYPTPROV *phProv,
  25. IN WCHAR const *pwszContainer,
  26. IN WCHAR const *pwszProvider,
  27. IN DWORD dwProvType,
  28. IN DWORD dwFlags,
  29. IN BOOL fMachineKeyset);
  30. HRESULT
  31. myGetSigningOID(
  32. OPTIONAL IN HCRYPTPROV hProv, // hProv OR pwszProvName & dwProvType
  33. OPTIONAL IN WCHAR const *pwszProvName,
  34. OPTIONAL IN DWORD dwProvType,
  35. IN ALG_ID idHashAlg,
  36. OUT CHAR **ppszAlgId);
  37. HRESULT
  38. myValidateSigningKey(
  39. IN WCHAR const *pwszKeyContainerName,
  40. IN WCHAR const *pwszProvName,
  41. IN DWORD dwProvType,
  42. IN BOOL fCryptSilent,
  43. IN BOOL fMachineKeyset,
  44. IN BOOL fForceSignatureTest,
  45. IN OPTIONAL CERT_CONTEXT const *pcc,
  46. IN OPTIONAL CERT_PUBLIC_KEY_INFO const *pPublicKeyInfo,
  47. IN ALG_ID idAlg,
  48. OPTIONAL OUT BOOL *pfSigningTestAttempted,
  49. OPTIONAL OUT HCRYPTPROV *phProv);
  50. HRESULT
  51. myValidateKeyForSigning(
  52. IN HCRYPTPROV hProv,
  53. OPTIONAL IN CERT_PUBLIC_KEY_INFO const *pPublicKeyInfo,
  54. IN ALG_ID algId);
  55. HRESULT
  56. myValidateKeyForEncrypting(
  57. IN HCRYPTPROV hProv,
  58. IN CERT_PUBLIC_KEY_INFO const *pPublicKeyInfo,
  59. IN ALG_ID algId);
  60. HRESULT
  61. myEnumProviders(
  62. IN DWORD dwIndex,
  63. IN DWORD *pdwReserved,
  64. IN DWORD dwFlags,
  65. OUT DWORD *pdwProvType,
  66. OUT WCHAR **ppwszProvName);
  67. #endif // __CSCSP_H__