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.

108 lines
3.3 KiB

  1. /////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 2000-2001.
  5. //
  6. // File: TemplateV2RequestPropertyPage.h
  7. //
  8. // Contents: Definition of CTemplateV2RequestPropertyPage
  9. //
  10. //----------------------------------------------------------------------------
  11. #if !defined(AFX_TEMPLATEV2REQUESTPROPERTYPAGE_H__A3E4D067_D3C3_4C85_A331_97D940A82063__INCLUDED_)
  12. #define AFX_TEMPLATEV2REQUESTPROPERTYPAGE_H__A3E4D067_D3C3_4C85_A331_97D940A82063__INCLUDED_
  13. #if _MSC_VER > 1000
  14. #pragma once
  15. #endif // _MSC_VER > 1000
  16. // TemplateV2RequestPropertyPage.h : header file
  17. //
  18. #include "CertTemplate.h"
  19. #include "TemplateV1RequestPropertyPage.h"
  20. /////////////////////////////////////////////////////////////////////////////
  21. // CTemplateV2RequestPropertyPage dialog
  22. class CTemplateV2RequestPropertyPage : public CHelpPropertyPage
  23. {
  24. // Construction
  25. public:
  26. CTemplateV2RequestPropertyPage(CCertTemplate& rCertTemplate, bool& rbIsDirty);
  27. virtual ~CTemplateV2RequestPropertyPage();
  28. // Dialog Data
  29. //{{AFX_DATA(CTemplateV2RequestPropertyPage)
  30. enum { IDD = IDD_TEMPLATE_V2_REQUEST };
  31. CComboBox m_minKeySizeCombo;
  32. CComboBox m_purposeCombo;
  33. CSPCheckListBox m_CSPListbox;
  34. //}}AFX_DATA
  35. // Overrides
  36. // ClassWizard generate virtual function overrides
  37. //{{AFX_VIRTUAL(CTemplateV2RequestPropertyPage)
  38. public:
  39. protected:
  40. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  41. //}}AFX_VIRTUAL
  42. // Implementation
  43. protected:
  44. virtual void DoContextHelp (HWND hWndControl);
  45. void AddKeySizeToCombo (DWORD dwValue, PCWSTR strValue, DWORD dwSizeToSelect);
  46. HRESULT EnumerateCSPs(DWORD dwMinKeySize);
  47. // Generated message map functions
  48. //{{AFX_MSG(CTemplateV2RequestPropertyPage)
  49. afx_msg void OnSelchangePurposeCombo();
  50. afx_msg void OnExportPrivateKey();
  51. afx_msg void OnArchiveKeyCheck();
  52. afx_msg void OnIncludeSymmetricAlgorithmsCheck();
  53. afx_msg void OnSelchangeMinimumKeysizeValue();
  54. afx_msg void OnUserInputRequiredForAutoenrollment();
  55. afx_msg void OnDeletePermanently();
  56. afx_msg void OnDestroy();
  57. //}}AFX_MSG
  58. afx_msg void OnCheckChange();
  59. DECLARE_MESSAGE_MAP()
  60. virtual BOOL OnInitDialog();
  61. virtual void EnableControls ();
  62. HRESULT CSPGetMaxKeySupported (
  63. PCWSTR pszProvider,
  64. DWORD dwProvType,
  65. DWORD& dwSigMaxKey,
  66. DWORD& dwKeyExMaxKey);
  67. void NormalizeCSPListBox (DWORD dwMinKeySize, bool bSetChecks);
  68. private:
  69. bool& m_rbIsDirty;
  70. CCertTemplate& m_rCertTemplate;
  71. int m_nProvDSSCnt;
  72. class CT_CSP_DATA
  73. {
  74. public:
  75. CT_CSP_DATA (PCWSTR pszName, DWORD dwProvType, DWORD dwSigMaxKeySize, DWORD dwKeyExMaxKeySize)
  76. : m_szName (pszName),
  77. m_dwProvType (dwProvType),
  78. m_dwSigMaxKeySize (dwSigMaxKeySize),
  79. m_dwKeyExMaxKeySize (dwKeyExMaxKeySize)
  80. {
  81. }
  82. CString m_szName;
  83. DWORD m_dwProvType;
  84. DWORD m_dwSigMaxKeySize;
  85. DWORD m_dwKeyExMaxKeySize;
  86. };
  87. typedef CTypedPtrList<CPtrList, CT_CSP_DATA*> CSP_LIST;
  88. CSP_LIST m_CSPList;
  89. };
  90. //{{AFX_INSERT_LOCATION}}
  91. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  92. #endif // !defined(AFX_TEMPLATEV2REQUESTPROPERTYPAGE_H__A3E4D067_D3C3_4C85_A331_97D940A82063__INCLUDED_)