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.

71 lines
1.7 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. myValidateKeyForSigning(
  39. IN HCRYPTPROV hProv,
  40. OPTIONAL IN CERT_PUBLIC_KEY_INFO const *pPublicKeyInfo,
  41. IN ALG_ID algId);
  42. HRESULT
  43. myValidateKeyForEncrypting(
  44. IN HCRYPTPROV hProv,
  45. IN CERT_PUBLIC_KEY_INFO const *pPublicKeyInfo,
  46. IN ALG_ID algId);
  47. HRESULT
  48. myValidateHashForSigning(
  49. IN WCHAR const *pwszContainer,
  50. IN WCHAR const *pszProvName,
  51. IN DWORD dwProvType,
  52. IN BOOL fMachineKeyset,
  53. IN OPTIONAL CERT_PUBLIC_KEY_INFO const *pPublicKeyInfo,
  54. IN ALG_ID algId);
  55. HRESULT
  56. myEnumProviders(
  57. IN DWORD dwIndex,
  58. IN DWORD *pdwReserved,
  59. IN DWORD dwFlags,
  60. OUT DWORD *pdwProvType,
  61. OUT WCHAR **ppwszProvName);
  62. #endif // __CSCSP_H__