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.

43 lines
1.3 KiB

  1. // pkiWinRegCertStore.h - Interface to CWinRegCertStore class
  2. //
  3. // (c) Copyright Schlumberger Technology Corp., unpublished work, created
  4. // 2000. This computer program includes Confidential, Proprietary
  5. // Information and is a Trade Secret of Schlumberger Technology Corp. All
  6. // use, disclosure, and/or reproduction is prohibited unless authorized
  7. // in writing. All Rights Reserved.
  8. /////////////////////////////////////////////////////////////////////////////////
  9. #if !defined(SLBPKI_WINREGISTRY_H)
  10. #define SLBPKI_WINREGISTRY_H
  11. #include <wincrypt.h>
  12. #include <string>
  13. #include "scuArrayP.h"
  14. namespace pki {
  15. class CWinRegCertStore
  16. {
  17. public:
  18. CWinRegCertStore(std::string strCertStore);
  19. ~CWinRegCertStore();
  20. void StoreUserCert(std::string const &strCert, DWORD const dwKeySpec,
  21. std::string const &strContName, std::string const &strProvName,
  22. std::string const &strFriendlyName);
  23. void StoreCACert(std::string const &strCert, std::string const &strFriendlyName);
  24. private:
  25. HCERTSTORE m_hCertStore;
  26. CWinRegCertStore() {};
  27. static std::string FriendlyName(std::string const CertValue);
  28. static scu::AutoArrayPtr<WCHAR> ToWideChar(std::string const strChar);
  29. };
  30. } // namespace pki
  31. #endif // SLBPKI_WINREGISTRY_H