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.

79 lines
2.4 KiB

  1. // CrtMapD.h : header file
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4. // C1To1CertMappingDlg dialog
  5. class C1To1CertMappingDlg : public CPropertyPage
  6. {
  7. // Construction
  8. public:
  9. C1To1CertMappingDlg(CWnd* pParent = NULL); // standard constructor
  10. ~C1To1CertMappingDlg(); // standard desstructor
  11. BOOL FInitMapper();
  12. virtual BOOL OnApply();
  13. virtual BOOL OnInitDialog();
  14. // Dialog Data
  15. //{{AFX_DATA(C1To1CertMappingDlg)
  16. enum { IDD = IDD_11CERT_MAPPING };
  17. CComboBox m_ccombo_authorities;
  18. CButton m_cbutton_chooseaccnt;
  19. CButton m_cbutton_delete;
  20. CListCtrl m_clistctrl_list;
  21. int m_int_authorities;
  22. //}}AFX_DATA
  23. // Overrides
  24. // ClassWizard generated virtual function overrides
  25. //{{AFX_VIRTUAL(C1To1CertMappingDlg)
  26. protected:
  27. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  28. //}}AFX_VIRTUAL
  29. // Implementation
  30. protected:
  31. // Generated message map functions
  32. //{{AFX_MSG(C1To1CertMappingDlg)
  33. afx_msg void OnChooseAccount();
  34. afx_msg void OnAdd();
  35. afx_msg void OnDelete();
  36. afx_msg void OnItemchangedList(NMHDR* pNMHDR, LRESULT* pResult);
  37. //}}AFX_MSG
  38. DECLARE_MESSAGE_MAP()
  39. // internal utilities
  40. BOOL FInitMappingList();
  41. BOOL FInitAuthorityComboBox();
  42. // iMap is the mapping's index into the main mapper object. It gets saved as the private
  43. // data in the list item. Returns success or failure
  44. BOOL FAddMappingToList( CCert11Mapping* pMap, DWORD iMap );
  45. BOOL FEditOneMapping( CCert11Mapping* pMap );
  46. void EditManyMappings();
  47. void UpdateMappingInDispList( DWORD iList, CCert11Mapping* pMap );
  48. // reads a named certificate file from the disk. This is the same sort of cert file
  49. // that is passed around by the keyring application. In fact, this routine is defined
  50. // in its own source file and is largly lifted from the keyring app. AddCert.cpp
  51. BOOL FAddCertificateFile( CString szFile );
  52. BOOL FAddCertificate( PUCHAR pCertificate, DWORD cbCertificate );
  53. // convert a binary data thing to a distinguished name
  54. BOOL FBuildNameString( PUCHAR pBData, DWORD cbBData, CString &szDN );
  55. BOOL BuildRdnList( PNAME_INFO pNameInfo, CString &szDN );
  56. LPSTR MapAsnName( LPSTR pAsnName );
  57. // state utilities
  58. void EnableDependantButtons();
  59. // its mapper
  60. CIisCert11Mapper m_mapper;
  61. };