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.

102 lines
3.3 KiB

  1. /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2. Microsoft Windows, Copyright (C) Microsoft Corporation, 2000
  3. File: PFXHlpr.h
  4. Content: Declaration of PFXHlpr.
  5. History: 09-15-2001 dsie created
  6. ------------------------------------------------------------------------------*/
  7. #ifndef __PFXHLPR_H_
  8. #define __PFXHLPR_H_
  9. #include "Debug.h"
  10. /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  11. Function : PFXExportStore
  12. Synopsis : Export cert store to PFX blob.
  13. Parameter: HCERTSTORE hCertStore - Store handle.
  14. LPWSTR pwszPassword - Password to encrypt the PFX file.
  15. DWPRD dwFlags - PFX export flags.
  16. DATA_BLOB * pPFXBlob - Pointer to DATA_BLOB to receive PFX blob.
  17. Remark :
  18. ------------------------------------------------------------------------------*/
  19. HRESULT PFXExportStore (HCERTSTORE hCertStore,
  20. LPWSTR pwszPassword,
  21. DWORD dwFlags,
  22. DATA_BLOB * pPFXBlob);
  23. /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  24. Function : PFXSaveStore
  25. Synopsis : Save a PFX file and return all the certs in a HCERTSTORE.
  26. Parameter: HCERTSTORE hCertStore - Store handle.
  27. LPWSTR pwszFileName - PFX filename.
  28. LPWSTR pwszPassword - Password to encrypt the PFX file.
  29. DWPRD dwFlags - PFX export flags.
  30. Remark :
  31. ------------------------------------------------------------------------------*/
  32. HRESULT PFXSaveStore (HCERTSTORE hCertStore,
  33. LPWSTR pwszFileName,
  34. LPWSTR pwszPassword,
  35. DWORD dwFlags);
  36. /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  37. Function : PFXLoadStore
  38. Synopsis : Load a PFX file and return all the certs in a HCERTSTORE.
  39. Parameter: LPWSTR pwszFileName - PFX filename.
  40. LPWSTR pwszPassword - Password to decrypt the PFX file.
  41. DWPRD dwFlags - PFX import flags.
  42. HCERTSTORE * phCertStore - Pointer to HCERSTORE to receive the
  43. handle.
  44. Remark :
  45. ------------------------------------------------------------------------------*/
  46. HRESULT PFXLoadStore (LPWSTR pwszFileName,
  47. LPWSTR pwszPassword,
  48. DWORD dwFlags,
  49. HCERTSTORE * phCertStore);
  50. /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  51. Function : PFXFreeStore
  52. Synopsis : Free resources by deleting key containers loaded by PFXLoadStore,
  53. and then close the store.
  54. Parameter: HCERTSTORE hCertStore - Store handle returned by PFXLoadStore.
  55. Remark : hCertStore is always closed even if error occurred.
  56. ------------------------------------------------------------------------------*/
  57. HRESULT PFXFreeStore (HCERTSTORE hCertStore);
  58. #endif //__PFXHLPR_H_