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.

93 lines
2.5 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. iisctl.cxx
  5. Abstract:
  6. This module contains the code for the class to deal with Certificate Trust Lists
  7. Author:
  8. Alex Mallet [amallet] 01-09-98
  9. Revision History:
  10. --*/
  11. #ifndef _IISCTL_HXX_
  12. #define _IISCTL_HXX_
  13. #ifndef dllexp
  14. #define dllexp __declspec( dllexport )
  15. #endif
  16. #ifndef IIS_STORE_NAMES
  17. #define IIS_STORE_NAMES
  18. #define MY_STORE_NAME "MY"
  19. #define CA_STORE_NAME "CA"
  20. #define ROOT_STORE_NAME "ROOT"
  21. #endif //IIS_STORE_NAMES
  22. class dllexp IIS_CTL
  23. {
  24. public:
  25. IIS_CTL( IN IMDCOM *pMBObject,
  26. IN LPTSTR pszMBPath );
  27. ~IIS_CTL();
  28. LPTSTR QueryMBPath() { return m_strMBPath.QueryStr() ; }
  29. LPTSTR QueryStoreName() { return m_strStoreName.QueryStr() ; }
  30. LPWSTR QueryListIdentifier() { return m_pwszListIdentifier ; }
  31. DWORD QueryStatus() { return m_dwStatus ; }
  32. BOOL IsValid();
  33. HCERTSTORE GetMemoryStore();
  34. HCERTSTORE QueryOriginalStore()
  35. { return (m_pCTLContext ? m_pCTLContext->hCertStore : NULL); }
  36. PCCTL_CONTEXT QueryCTLContext() { return m_pCTLContext ; }
  37. BOOL QuerySignerCert( PCCERT_CONTEXT *ppcSigner );
  38. BOOL VerifySignature( HCERTSTORE *phSignerStores,
  39. DWORD cSignerStores,
  40. LPBOOL pfTrusted );
  41. BOOL GetContainedCertificates( OUT PCCERT_CONTEXT **pppCertContext,
  42. OUT DWORD *pcCertsFound,
  43. OUT DWORD *pcCertsInCTL );
  44. private:
  45. STR m_strMBPath; //key in metabase under which CTL data is stored
  46. LPWSTR m_pwszListIdentifier; //list identifier read out of metabase
  47. STR m_strStoreName; //name of store in which CTL is
  48. HCRYPTPROV m_hCryptProv; //crypto provider for CTL
  49. HCERTSTORE m_hMemoryStore; //in-memory store that only has this CTL in it
  50. HCERTSTORE m_hMyStore; //cached handle to Local Machine MY store
  51. HCERTSTORE m_hCAStore; //cached handle to Local Machine CA store
  52. HCERTSTORE m_hRootStore;//cached handle to Local Machine ROOT store
  53. PCCTL_CONTEXT m_pCTLContext; //actual CTL
  54. DWORD m_dwStatus; //status of object
  55. BOOL m_fFoundCerts; //bool indicating whether we've retrieved actual certs in CTL
  56. PCCERT_CONTEXT *m_pCTLCerts; //array holding certs in CTL
  57. DWORD m_cCertsFound; //number of certs in CTL that were found
  58. PCCERT_CONTEXT m_pSignerCert; //cert that signed the CTL
  59. };
  60. typedef IIS_CTL *PIIS_CTL;
  61. #endif // _IISCTL_HXX_