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.

788 lines
19 KiB

  1. //
  2. // CertContentsPages.cpp
  3. //
  4. #include "stdafx.h"
  5. #include "resource.h"
  6. #include "CertContentsPages.h"
  7. #include "Certificat.h"
  8. #include "CertUtil.h"
  9. #ifdef _DEBUG
  10. #define new DEBUG_NEW
  11. #undef THIS_FILE
  12. static char THIS_FILE[] = __FILE__;
  13. #endif
  14. ////////////////////// Local helper functions ////////////////////////
  15. static void
  16. AppendField(CString& str, UINT id, const CString& text)
  17. {
  18. CString strName;
  19. if (!text.IsEmpty())
  20. {
  21. if (strName.LoadString(id))
  22. {
  23. str += strName;
  24. str += _T("\t");
  25. str += text;
  26. str += _T("\r\n");
  27. }
  28. }
  29. }
  30. static void
  31. FormatCertDescription(CERT_DESCRIPTION& desc, CString& str)
  32. {
  33. AppendField(str, IDS_ISSUED_TO, desc.m_CommonName);
  34. AppendField(str, IDS_ISSUED_BY, desc.m_CAName);
  35. AppendField(str, IDS_EXPIRATION_DATE, desc.m_ExpirationDate);
  36. AppendField(str, IDS_PURPOSE, desc.m_Usage);
  37. AppendField(str, IDS_FRIENDLY_NAME, desc.m_FriendlyName);
  38. AppendField(str, IDS_COUNTRY, desc.m_Country);
  39. AppendField(str, IDS_STATE, desc.m_State);
  40. AppendField(str, IDS_LOCALITY, desc.m_Locality);
  41. AppendField(str, IDS_ORGANIZATION, desc.m_Organization);
  42. AppendField(str, IDS_ORGANIZATION_UNIT, desc.m_OrganizationUnit);
  43. }
  44. #if 0
  45. static void
  46. FormatCertContactInfo(CCertificate * pCert, CString& str)
  47. {
  48. AppendField(str, IDS_CONTACT_NAME, pCert->m_ContactName);
  49. AppendField(str, IDS_CONTACT_ADDRESS, pCert->m_ContactAddress);
  50. CString strPhone = pCert->m_ContactPhone;
  51. if (!pCert->m_ContactPhoneExt.IsEmpty())
  52. {
  53. strPhone += _T("x");
  54. strPhone += pCert->m_ContactPhoneExt;
  55. }
  56. AppendField(str, IDS_CONTACT_PHONE, strPhone);
  57. }
  58. #endif
  59. static BOOL
  60. ExtractDescription(CCertificate * pCert, CERT_DESCRIPTION& cd)
  61. {
  62. ASSERT(pCert != NULL);
  63. cd.m_CommonName = pCert->m_CommonName;
  64. cd.m_FriendlyName = pCert->m_FriendlyName;
  65. cd.m_Country = pCert->m_Country;
  66. cd.m_State = pCert->m_State;
  67. cd.m_Locality = pCert->m_Locality;
  68. cd.m_Organization = pCert->m_Organization;
  69. cd.m_OrganizationUnit = pCert->m_OrganizationUnit;
  70. return TRUE;
  71. }
  72. /////////////////////////////////////////////////////////////////////////////
  73. // CCertContentsPage base property page
  74. IMPLEMENT_DYNCREATE(CCertContentsPage, CIISWizardPage)
  75. CCertContentsPage::CCertContentsPage(UINT id, CCertificate * pCert)
  76. : CIISWizardPage(id, IDS_CERTWIZ, TRUE),
  77. m_pCert(pCert)
  78. {
  79. ASSERT(id != 0);
  80. }
  81. CCertContentsPage::~CCertContentsPage()
  82. {
  83. }
  84. void CCertContentsPage::DoDataExchange(CDataExchange* pDX)
  85. {
  86. CIISWizardPage::DoDataExchange(pDX);
  87. //{{AFX_DATA_MAP(CCertContentsPage)
  88. //}}AFX_DATA_MAP
  89. }
  90. BEGIN_MESSAGE_MAP(CCertContentsPage, CIISWizardPage)
  91. //{{AFX_MSG_MAP(CCertContentsPage)
  92. //}}AFX_MSG_MAP
  93. END_MESSAGE_MAP()
  94. // OnSetActive we format cert contents and put it to edit
  95. // control with predefined ID. We should do it here, because
  96. // if user will get back and reselect certificate, text should
  97. // also be changed
  98. //
  99. BOOL
  100. CCertContentsPage::OnSetActive()
  101. {
  102. CERT_DESCRIPTION cd;
  103. if (CIISWizardPage::OnSetActive())
  104. {
  105. // If page defines GetCertDescription() then it want this
  106. // data to be displayed
  107. if (GetCertDescription(cd))
  108. {
  109. ASSERT(NULL != GetDlgItem(IDC_CERT_CONTENTS));
  110. CString str;
  111. FormatCertDescription(cd, str);
  112. GetDlgItem(IDC_CERT_CONTENTS)->SetWindowText(str);
  113. }
  114. return TRUE;
  115. }
  116. return FALSE;
  117. }
  118. BOOL CCertContentsPage::OnInitDialog()
  119. {
  120. ASSERT(m_pCert != NULL);
  121. CIISWizardPage::OnInitDialog();
  122. // do this check so that prefix doesn't complain about GetDlgItem
  123. if ( (this != NULL) && (this->m_hWnd != NULL) )
  124. {
  125. ASSERT(NULL != GetDlgItem(IDC_CERT_CONTENTS));
  126. CEdit * pEdit = (CEdit *)CWnd::FromHandle(GetDlgItem(IDC_CERT_CONTENTS)->m_hWnd);
  127. CRect rcEdit;
  128. pEdit->GetClientRect(&rcEdit);
  129. int baseunitX = LOWORD(GetDialogBaseUnits());
  130. int width_units = MulDiv(rcEdit.Width(), 4, baseunitX);
  131. //pEdit->SetTabStops(MulDiv(45, width_units, 100));
  132. pEdit->SetTabStops(width_units/2);
  133. }
  134. return TRUE;
  135. }
  136. ////////////////////////////////////////////////////////////////////////////////////////
  137. // CInstallCertPage
  138. IMPLEMENT_DYNCREATE(CInstallCertPage, CCertContentsPage)
  139. BOOL
  140. CInstallCertPage::GetCertDescription(CERT_DESCRIPTION& cd)
  141. {
  142. return GetCertificate()->GetSelectedCertDescription(cd);
  143. }
  144. LRESULT
  145. CInstallCertPage::OnWizardNext()
  146. {
  147. GetCertificate()->InstallSelectedCert();
  148. return IDD_PAGE_NEXT;
  149. }
  150. LRESULT
  151. CInstallCertPage::OnWizardBack()
  152. {
  153. #ifdef ENABLE_W3SVC_SSL_PAGE
  154. if (IsWebServerType(m_pCert->m_WebSiteInstanceName))
  155. {
  156. return IDD_PAGE_PREV_W3SVC_ONLY;
  157. }
  158. #endif
  159. return IDD_PAGE_PREV;
  160. }
  161. ////////////////////////////////////////////////////////////////////////////////////////
  162. // CReplaceCertPage
  163. IMPLEMENT_DYNCREATE(CReplaceCertPage, CCertContentsPage)
  164. BOOL
  165. CReplaceCertPage::GetCertDescription(CERT_DESCRIPTION& cd)
  166. {
  167. return GetCertificate()->GetSelectedCertDescription(cd);
  168. }
  169. LRESULT
  170. CReplaceCertPage::OnWizardNext()
  171. {
  172. GetCertificate()->InstallSelectedCert();
  173. return IDD_PAGE_NEXT;
  174. }
  175. LRESULT
  176. CReplaceCertPage::OnWizardBack()
  177. {
  178. return IDD_PAGE_PREV;
  179. }
  180. ////////////////////////////////////////////////////////////////////////////////////////
  181. // CInstallKeyPage
  182. IMPLEMENT_DYNCREATE(CInstallKeyPage, CCertContentsPage)
  183. BOOL
  184. CInstallKeyPage::OnSetActive()
  185. {
  186. ASSERT(NULL != GetDlgItem(IDC_CERT_CONTENTS));
  187. ASSERT(NULL != GetDlgItem(IDC_FILE_NAME));
  188. if (CCertContentsPage::OnSetActive())
  189. {
  190. CString strPath = GetCertificate()->m_KeyFileName;
  191. CompactPathToWidth(GetDlgItem(IDC_FILE_NAME), strPath);
  192. SetDlgItemText(IDC_FILE_NAME, strPath);
  193. return TRUE;
  194. }
  195. return FALSE;
  196. }
  197. BOOL
  198. CInstallKeyPage::GetCertDescription(CERT_DESCRIPTION& cd)
  199. {
  200. return GetCertificate()->GetKeyCertDescription(cd);
  201. }
  202. LRESULT
  203. CInstallKeyPage::OnWizardNext()
  204. {
  205. GetCertificate()->InstallKeyRingCert();
  206. return IDD_PAGE_NEXT;
  207. }
  208. LRESULT
  209. CInstallKeyPage::OnWizardBack()
  210. {
  211. #ifdef ENABLE_W3SVC_SSL_PAGE
  212. if (IsWebServerType(m_pCert->m_WebSiteInstanceName))
  213. {
  214. return IDD_PAGE_PREV_W3SVC_ONLY;
  215. }
  216. #endif
  217. return IDD_PAGE_PREV;
  218. }
  219. ////////////////////////////////////////////////////////////////////////////////////////
  220. // CInstallImportPFXPage
  221. IMPLEMENT_DYNCREATE(CInstallImportPFXPage, CCertContentsPage)
  222. BOOL
  223. CInstallImportPFXPage::OnSetActive()
  224. {
  225. ASSERT(NULL != GetDlgItem(IDC_CERT_CONTENTS));
  226. ASSERT(NULL != GetDlgItem(IDC_FILE_NAME));
  227. if (CCertContentsPage::OnSetActive())
  228. {
  229. CString strPath = GetCertificate()->m_KeyFileName;
  230. CompactPathToWidth(GetDlgItem(IDC_FILE_NAME), strPath);
  231. SetDlgItemText(IDC_FILE_NAME, strPath);
  232. return TRUE;
  233. }
  234. return FALSE;
  235. }
  236. BOOL
  237. CInstallImportPFXPage::GetCertDescription(CERT_DESCRIPTION& cd)
  238. {
  239. return GetCertificate()->GetPFXFileCertDescription(cd);
  240. }
  241. LRESULT
  242. CInstallImportPFXPage::OnWizardNext()
  243. {
  244. GetCertificate()->InstallImportPFXCert();
  245. return IDD_PAGE_NEXT;
  246. }
  247. LRESULT
  248. CInstallImportPFXPage::OnWizardBack()
  249. {
  250. #ifdef ENABLE_W3SVC_SSL_PAGE
  251. if (IsWebServerType(m_pCert->m_WebSiteInstanceName))
  252. {
  253. return IDD_PAGE_PREV_W3SVC_ONLY;
  254. }
  255. #endif
  256. return IDD_PAGE_PREV;
  257. }
  258. ////////////////////////////////////////////////////////////////////////////////////////
  259. // CInstallExportPFXPage
  260. IMPLEMENT_DYNCREATE(CInstallExportPFXPage, CCertContentsPage)
  261. BOOL
  262. CInstallExportPFXPage::OnSetActive()
  263. {
  264. ASSERT(NULL != GetDlgItem(IDC_CERT_CONTENTS));
  265. ASSERT(NULL != GetDlgItem(IDC_FILE_NAME));
  266. if (CCertContentsPage::OnSetActive())
  267. {
  268. CString strPath = GetCertificate()->m_KeyFileName;
  269. CompactPathToWidth(GetDlgItem(IDC_FILE_NAME), strPath);
  270. SetDlgItemText(IDC_FILE_NAME, strPath);
  271. return TRUE;
  272. }
  273. return FALSE;
  274. }
  275. BOOL
  276. CInstallExportPFXPage::GetCertDescription(CERT_DESCRIPTION& cd)
  277. {
  278. //return GetCertificate()->GetKeyCertDescription(cd);
  279. return GetCertificate()->GetInstalledCertDescription(cd);
  280. }
  281. LRESULT
  282. CInstallExportPFXPage::OnWizardNext()
  283. {
  284. GetCertificate()->InstallExportPFXCert();
  285. return IDD_PAGE_NEXT;
  286. }
  287. LRESULT
  288. CInstallExportPFXPage::OnWizardBack()
  289. {
  290. return IDD_PAGE_PREV;
  291. }
  292. ////////////////////////////////////////////////////////////////////////////////////////
  293. // CInstallRespPage
  294. IMPLEMENT_DYNCREATE(CInstallRespPage, CCertContentsPage)
  295. BOOL
  296. CInstallRespPage::OnSetActive()
  297. {
  298. ASSERT(NULL != GetDlgItem(IDC_CERT_CONTENTS));
  299. ASSERT(NULL != GetDlgItem(IDC_FILE_NAME));
  300. if (CCertContentsPage::OnSetActive())
  301. {
  302. CString strPath = GetCertificate()->m_RespFileName;
  303. CompactPathToWidth(GetDlgItem(IDC_FILE_NAME), strPath);
  304. SetDlgItemText(IDC_FILE_NAME, strPath);
  305. return TRUE;
  306. }
  307. return FALSE;
  308. }
  309. BOOL
  310. CInstallRespPage::GetCertDescription(CERT_DESCRIPTION& cd)
  311. {
  312. return GetCertificate()->GetResponseCertDescription(cd);
  313. }
  314. LRESULT
  315. CInstallRespPage::OnWizardNext()
  316. {
  317. GetCertificate()->InstallResponseCert();
  318. #ifdef ENABLE_W3SVC_SSL_PAGE
  319. // see if the SSL attribute was set...if it was then set the SSL site for this certificate...
  320. if (!m_pCert->m_SSLPort.IsEmpty())
  321. {
  322. // get the port and write it to the metabase.
  323. WriteSSLPortToSite(m_pCert->m_MachineName,m_pCert->m_WebSiteInstanceName,m_pCert->m_SSLPort,&m_pCert->m_hResult);
  324. }
  325. #endif
  326. return IDD_PAGE_NEXT;
  327. }
  328. LRESULT
  329. CInstallRespPage::OnWizardBack()
  330. {
  331. #ifdef ENABLE_W3SVC_SSL_PAGE
  332. if (IsWebServerType(m_pCert->m_WebSiteInstanceName))
  333. {
  334. return IDD_PAGE_PREV_W3SVC_ONLY;
  335. }
  336. #endif
  337. return IDD_PAGE_PREV;
  338. }
  339. ////////////////////////////////////////////////////////////////////////////////////////
  340. // CRemoveCertPage
  341. IMPLEMENT_DYNCREATE(CRemoveCertPage, CCertContentsPage)
  342. static BOOL
  343. AnswerIsYes2(UINT id, CString& file)
  344. {
  345. CString strMessage;
  346. AfxFormatString1(strMessage, id, file);
  347. return (IDYES == AfxMessageBox(strMessage, MB_ICONEXCLAMATION | MB_YESNO));
  348. }
  349. BOOL
  350. CRemoveCertPage::GetCertDescription(CERT_DESCRIPTION& cd)
  351. {
  352. CCertificate * pCert = GetCertificate();
  353. ASSERT(NULL != pCert);
  354. return pCert->GetInstalledCertDescription(cd);
  355. }
  356. LRESULT
  357. CRemoveCertPage::OnWizardNext()
  358. {
  359. CCertificate * pCert = GetCertificate();
  360. ASSERT(NULL != pCert);
  361. int iTheReturn = 1;
  362. #if 0
  363. CStringList listNodesUsingThisCert;
  364. int iReallyRemoveCert = FALSE;
  365. // check if this cert is being used first...
  366. IsCertUsedBySSLBelowMe(pCert->m_MachineName,pCert->m_WebSiteInstanceName,listNodesUsingThisCert);
  367. if (listNodesUsingThisCert.IsEmpty())
  368. {
  369. iReallyRemoveCert = TRUE;
  370. }
  371. else
  372. {
  373. // if the cert is being used, then
  374. // don't let them remove it
  375. CString csStringCount;
  376. csStringCount.Format(_T("%d"), listNodesUsingThisCert.GetCount());
  377. if (TRUE == AnswerIsYes2(IDS_CERT_BEING_USED, csStringCount))
  378. {
  379. iReallyRemoveCert = TRUE;
  380. }
  381. else
  382. {
  383. iTheReturn = 1;
  384. }
  385. }
  386. if (iReallyRemoveCert)
  387. {
  388. #endif
  389. // go ahead and remove the cert
  390. if ( FAILED(pCert->UninstallCert())
  391. // || FAILED(ShutdownSSL(pCert->m_MachineName, pCert->m_WebSiteInstanceName))
  392. )
  393. {
  394. GetCertificate()->SetBodyTextID(IDS_REMOVE_CERT_FAILED);
  395. }
  396. iTheReturn = IDD_PAGE_NEXT;
  397. // }
  398. return iTheReturn;
  399. }
  400. LRESULT
  401. CRemoveCertPage::OnWizardBack()
  402. {
  403. return IDD_PAGE_PREV;
  404. }
  405. ////////////////////////////////////////////////////////////////////////////////////////
  406. // CRequestCancelPage
  407. IMPLEMENT_DYNCREATE(CRequestCancelPage, CCertContentsPage)
  408. //
  409. // In this case we should get request from the dummy cert in REQUEST store,
  410. // because we dropping request without any connection to response.
  411. //
  412. BOOL
  413. CRequestCancelPage::GetCertDescription(CERT_DESCRIPTION& cd)
  414. {
  415. return FALSE;
  416. }
  417. LRESULT
  418. CRequestCancelPage::OnWizardNext()
  419. {
  420. GetCertificate()->CancelRequest();
  421. return IDD_PAGE_NEXT;
  422. }
  423. LRESULT
  424. CRequestCancelPage::OnWizardBack()
  425. {
  426. return IDD_PAGE_PREV;
  427. }
  428. /////////////////////////////////////////////////////////////////////////////
  429. // CRequestToFilePage property page
  430. IMPLEMENT_DYNCREATE(CRequestToFilePage, CCertContentsPage)
  431. // This page prepares and shows contents itself
  432. // We should format contact info first, then description
  433. // default method could do only description
  434. //
  435. BOOL
  436. CRequestToFilePage::OnSetActive()
  437. {
  438. if (CCertContentsPage::OnSetActive())
  439. {
  440. ASSERT(GetCertificate() != NULL);
  441. ASSERT(GetDlgItem(IDC_CERT_CONTENTS) != NULL);
  442. ASSERT(GetDlgItem(IDC_FILE_NAME) != NULL);
  443. if (GetCertificate()->GetStatusCode() == CCertificate::REQUEST_RENEW_CERT)
  444. {
  445. GetCertificate()->LoadRenewalData();
  446. }
  447. CString str;
  448. // FormatCertContactInfo(m_pCert, str);
  449. CERT_DESCRIPTION cd;
  450. ExtractDescription(GetCertificate(), cd);
  451. FormatCertDescription(cd, str);
  452. SetDlgItemText(IDC_CERT_CONTENTS, str);
  453. CString strPath = m_pCert->m_ReqFileName;
  454. CompactPathToWidth(GetDlgItem(IDC_FILE_NAME), strPath);
  455. SetDlgItemText(IDC_FILE_NAME, strPath);
  456. return TRUE;
  457. }
  458. return FALSE;
  459. }
  460. LRESULT
  461. CRequestToFilePage::OnWizardNext()
  462. {
  463. GetCertificate()->PrepareRequest();
  464. return IDD_PAGE_NEXT;
  465. }
  466. LRESULT
  467. CRequestToFilePage::OnWizardBack()
  468. {
  469. return IDD_PAGE_PREV;
  470. }
  471. /////////////////////////////////////////////////////////////////////////////
  472. // CRequestToFilePageRenew property page
  473. IMPLEMENT_DYNCREATE(CRequestToFilePageRenew, CCertContentsPage)
  474. // This page prepares and shows contents itself
  475. // We should format contact info first, then description
  476. // default method could do only description
  477. //
  478. BOOL
  479. CRequestToFilePageRenew::OnSetActive()
  480. {
  481. if (CCertContentsPage::OnSetActive())
  482. {
  483. ASSERT(GetCertificate() != NULL);
  484. ASSERT(GetDlgItem(IDC_CERT_CONTENTS) != NULL);
  485. ASSERT(GetDlgItem(IDC_FILE_NAME) != NULL);
  486. if (GetCertificate()->GetStatusCode() == CCertificate::REQUEST_RENEW_CERT)
  487. {
  488. GetCertificate()->LoadRenewalData();
  489. }
  490. CString str;
  491. // FormatCertContactInfo(m_pCert, str);
  492. CERT_DESCRIPTION cd;
  493. ExtractDescription(GetCertificate(), cd);
  494. FormatCertDescription(cd, str);
  495. SetDlgItemText(IDC_CERT_CONTENTS, str);
  496. CString strPath = m_pCert->m_ReqFileName;
  497. CompactPathToWidth(GetDlgItem(IDC_FILE_NAME), strPath);
  498. SetDlgItemText(IDC_FILE_NAME, strPath);
  499. return TRUE;
  500. }
  501. return FALSE;
  502. }
  503. LRESULT
  504. CRequestToFilePageRenew::OnWizardNext()
  505. {
  506. GetCertificate()->PrepareRequest();
  507. return IDD_PAGE_NEXT;
  508. }
  509. LRESULT
  510. CRequestToFilePageRenew::OnWizardBack()
  511. {
  512. return IDD_PAGE_PREV;
  513. }
  514. /////////////////////////////////////////////////////////////////////////////
  515. // COnlineRequestSubmit property page
  516. IMPLEMENT_DYNCREATE(COnlineRequestSubmit, CCertContentsPage)
  517. BOOL
  518. COnlineRequestSubmit::GetCertDescription(CERT_DESCRIPTION& cd)
  519. {
  520. // we have all data in CCertificate
  521. return ExtractDescription(GetCertificate(), cd);
  522. }
  523. LRESULT
  524. COnlineRequestSubmit::OnWizardNext()
  525. {
  526. LRESULT id = IDD_PAGE_NEXT;
  527. BeginWaitCursor();
  528. if (GetCertificate()->GetStatusCode() == CCertificate::REQUEST_RENEW_CERT)
  529. {
  530. GetCertificate()->SubmitRenewalRequest();
  531. }
  532. else if (m_pCert->GetStatusCode() == CCertificate::REQUEST_NEW_CERT)
  533. {
  534. GetCertificate()->SubmitRequest();
  535. #ifdef ENABLE_W3SVC_SSL_PAGE
  536. // see if the SSL attribute was set...if it was then set the SSL site for this certificate...
  537. if (!m_pCert->m_SSLPort.IsEmpty())
  538. {
  539. // get the port and write it to the metabase.
  540. WriteSSLPortToSite(m_pCert->m_MachineName,m_pCert->m_WebSiteInstanceName,m_pCert->m_SSLPort,&m_pCert->m_hResult);
  541. }
  542. #endif
  543. }
  544. else
  545. {
  546. id = 1;
  547. }
  548. EndWaitCursor();
  549. return id;
  550. }
  551. LRESULT
  552. COnlineRequestSubmit::OnWizardBack()
  553. {
  554. return IDD_PAGE_PREV;
  555. }
  556. BOOL
  557. COnlineRequestSubmit::OnSetActive()
  558. {
  559. ASSERT(GetCertificate() != NULL);
  560. ASSERT(GetDlgItem(IDC_CA_NAME) != NULL);
  561. ASSERT(GetDlgItem(IDC_CA_NAME2) != NULL);
  562. if (CCertContentsPage::OnSetActive())
  563. {
  564. CString csTemp1;
  565. // Make it look good
  566. csTemp1 = GetCertificate()->m_ConfigCA;
  567. int iFind = csTemp1.Find(_T("\\"));
  568. if (iFind != -1)
  569. {
  570. int iLength = csTemp1.GetLength();
  571. CString csTemp2;
  572. csTemp2 = csTemp1.Left(iFind);
  573. SetDlgItemText(IDC_CA_NAME, csTemp2);
  574. csTemp2 = csTemp1.Right(iLength - iFind - 1);
  575. SetDlgItemText(IDC_CA_NAME2, csTemp2);
  576. }
  577. else
  578. {
  579. SetDlgItemText(IDC_CA_NAME, csTemp1);
  580. }
  581. return TRUE;
  582. }
  583. return FALSE;
  584. }
  585. ////////////////////////////////////////////////////////////////////////////////////////
  586. // CInstallCopyFromRemotePage
  587. IMPLEMENT_DYNCREATE(CInstallCopyFromRemotePage, CCertContentsPage)
  588. BOOL
  589. CInstallCopyFromRemotePage::GetCertDescription(CERT_DESCRIPTION& cd)
  590. {
  591. BOOL bReturn = FALSE;
  592. bReturn = GetCertificate()->GetRemoteFileCertDescription(cd);
  593. return bReturn;
  594. }
  595. LRESULT
  596. CInstallCopyFromRemotePage::OnWizardNext()
  597. {
  598. GetCertificate()->InstallCopyMoveFromRemote();
  599. return IDD_PAGE_NEXT;
  600. }
  601. LRESULT
  602. CInstallCopyFromRemotePage::OnWizardBack()
  603. {
  604. return IDD_PAGE_PREV;
  605. }
  606. ////////////////////////////////////////////////////////////////////////////////////////
  607. // CInstallMoveFromRemotePage
  608. IMPLEMENT_DYNCREATE(CInstallMoveFromRemotePage, CCertContentsPage)
  609. BOOL
  610. CInstallMoveFromRemotePage::GetCertDescription(CERT_DESCRIPTION& cd)
  611. {
  612. return GetCertificate()->GetRemoteFileCertDescription(cd);
  613. }
  614. LRESULT
  615. CInstallMoveFromRemotePage::OnWizardNext()
  616. {
  617. GetCertificate()->InstallCopyMoveFromRemote();
  618. return IDD_PAGE_NEXT;
  619. }
  620. LRESULT
  621. CInstallMoveFromRemotePage::OnWizardBack()
  622. {
  623. return IDD_PAGE_PREV;
  624. }
  625. ////////////////////////////////////////////////////////////////////////////////////////
  626. // CInstallCopyFromRemotePage
  627. IMPLEMENT_DYNCREATE(CInstallCopyToRemotePage, CCertContentsPage)
  628. BOOL
  629. CInstallCopyToRemotePage::GetCertDescription(CERT_DESCRIPTION& cd)
  630. {
  631. return GetCertificate()->GetInstalledCertDescription(cd);
  632. }
  633. LRESULT
  634. CInstallCopyToRemotePage::OnWizardNext()
  635. {
  636. GetCertificate()->InstallCopyMoveToRemote();
  637. return IDD_PAGE_NEXT;
  638. }
  639. LRESULT
  640. CInstallCopyToRemotePage::OnWizardBack()
  641. {
  642. return IDD_PAGE_PREV;
  643. }
  644. ////////////////////////////////////////////////////////////////////////////////////////
  645. // CInstallMoveFromRemotePage
  646. IMPLEMENT_DYNCREATE(CInstallMoveToRemotePage, CCertContentsPage)
  647. BOOL
  648. CInstallMoveToRemotePage::GetCertDescription(CERT_DESCRIPTION& cd)
  649. {
  650. return GetCertificate()->GetInstalledCertDescription(cd);
  651. }
  652. LRESULT
  653. CInstallMoveToRemotePage::OnWizardNext()
  654. {
  655. GetCertificate()->InstallCopyMoveToRemote();
  656. return IDD_PAGE_NEXT;
  657. }
  658. LRESULT
  659. CInstallMoveToRemotePage::OnWizardBack()
  660. {
  661. return IDD_PAGE_PREV;
  662. }