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.

101 lines
2.6 KiB

  1. //+--------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1996 - 1999
  5. //
  6. // File: configp.h
  7. //
  8. // Contents: Declaration of CCertConfigPrivate
  9. //
  10. //---------------------------------------------------------------------------
  11. #include <cryptui.h>
  12. #include "cscomres.h" // main symbols
  13. /////////////////////////////////////////////////////////////////////////////
  14. // certcli
  15. typedef struct _CERT_AUTHORITY_INFO
  16. {
  17. WCHAR *pwszSanitizedName;
  18. WCHAR *pwszSanitizedShortName;
  19. WCHAR *pwszSanitizedOrgUnit;
  20. WCHAR *pwszSanitizedOrganization;
  21. WCHAR *pwszSanitizedLocality;
  22. WCHAR *pwszSanitizedState;
  23. WCHAR *pwszSanitizedCountry;
  24. WCHAR *pwszSanitizedConfig;
  25. WCHAR *pwszSanitizedExchangeCertificate;
  26. WCHAR *pwszSanitizedSignatureCertificate;
  27. WCHAR *pwszSanitizedDescription;
  28. DWORD Flags;
  29. } CERT_AUTHORITY_INFO;
  30. class CCertConfigPrivate
  31. {
  32. public:
  33. CCertConfigPrivate()
  34. {
  35. m_pCertAuthorityInfo = NULL;
  36. m_fUseDS = TRUE;
  37. m_pwszSharedFolder = NULL;
  38. }
  39. ~CCertConfigPrivate();
  40. // ICertConfig
  41. public:
  42. HRESULT Reset(
  43. /* [in] */ LONG Index,
  44. /* [retval][out] */ LONG __RPC_FAR *pCount);
  45. HRESULT Next(
  46. /* [retval][out] */ LONG __RPC_FAR *pIndex);
  47. HRESULT GetField(
  48. /* [in] */ BSTR const strFieldName,
  49. /* [retval][out] */ BSTR __RPC_FAR *pstrOut);
  50. HRESULT GetConfig(
  51. /* [in] */ LONG Flags,
  52. /* [retval][out] */ BSTR __RPC_FAR *pstrOut);
  53. // ICertConfig2
  54. public:
  55. HRESULT SetSharedFolder(
  56. /* [in] */ const BSTR strSharedFolder);
  57. // myGetConfigFromPicker
  58. public:
  59. HRESULT GetConfigFromPicker(
  60. OPTIONAL IN HWND hwndParent,
  61. OPTIONAL IN WCHAR const *pwszPrompt,
  62. OPTIONAL IN WCHAR const *pwszTitle,
  63. OPTIONAL IN WCHAR const *pwszSharedFolder,
  64. IN BOOL fUseDS,
  65. IN BOOL fCountOnly,
  66. OUT DWORD *pdwCount,
  67. OUT CRYPTUI_CA_CONTEXT const **ppCAContext);
  68. private:
  69. HRESULT _ResizeCAInfo(
  70. IN LONG Count);
  71. HRESULT _LoadTable(VOID);
  72. HRESULT _AddRegistryConfigEntry(
  73. IN WCHAR const *pwszMachine,
  74. IN WCHAR const *pwszMachineOld,
  75. IN WCHAR const *pwszSanitizedCAName,
  76. IN BOOL fParentCA,
  77. OPTIONAL IN CERT_CONTEXT const *pccCAChild,
  78. OPTIONAL OUT CERT_CONTEXT const **ppccCAOut); // NULL == local CA
  79. CERT_AUTHORITY_INFO *m_pCertAuthorityInfo;
  80. LONG m_Index;
  81. LONG m_Count;
  82. BOOL m_fUseDS;
  83. WCHAR *m_pwszSharedFolder;
  84. };