-void TaskCertify::createInstallPopup(PopupType type, const std::string &label)
-{
- m_contextData.job->Pause();
- if(m_popup)
- destroyPopup();
- bool ret = createPopup();
- if(ret)
- {
- loadPopup(type, label);
- showPopup();
- }
-}
-void TaskCertify::StepDeletePopupWin()
-{
- destroyPopup();
-}
-
-void TaskCertify::stepWarningPopup()
-{
- LogInfo("Step:: <<Warning Popup>>");
- // SP-2151: If widget is not recognized (OCSP status of any of certificates
- // it is signed with is not recognized) WRT must notify user that
- // widget cannot be installed as a trusted application, and let the
- // user decide whether it should be installed as an untrusted
- // application.
- if (!m_contextData.wacSecurity.isDistributorSigned()) {
- std::string label = UNTRUSTED_WIDGET +
- LABEL_NEW_LINE_2 +
- QUESTION;
- createInstallPopup(PopupType::WIDGET_UNRECOGNIZED, label);
- }
-}
-
-std::string TaskCertify::createAuthorWidgetInfo() const
-{
- std::string authorInfo;
- if (m_contextData.wacSecurity.isRecognized()) {
- //authorInfo += _("IDS_IM_WIDGET_RECOGNISED");
- authorInfo += _("WIDGET RECOGNISED");
- } else {
- //authorInfo += _("IDS_IM_WIDGET_UNRECOGNISED");
- authorInfo += _("WIDGET UNRECOGNISED");
- }
-
- authorInfo += LABEL_NEW_LINE_2;
- ValidationCore::CertificatePtr authorCert =
- m_contextData.wacSecurity.getAuthorCertificatePtr();
- if (!!authorCert) {
- DPL::Optional < DPL::String > organizationName =
- authorCert->getOrganizationName();
-
- //authorInfo += _("IDS_IM_WIDGET_AUTHOR_ORGANIZATION_NAME");
- authorInfo += _("AUTHOR ORGANIZATION NAME");
- authorInfo += LABEL_NEW_LINE;
-
- if (!organizationName.IsNull()) {
- authorInfo += DPL::ToUTF8String(*organizationName);
- } else {
- //authorInfo += _("IDS_IM_WIDGET_ORGANIZATION_UNKNOWN");
- authorInfo += _("WIDGET ORGANIZATION UNKNOWN");
- }
-
- authorInfo += LABEL_NEW_LINE_2;
-
- DPL::Optional < DPL::String > countryName =
- authorCert->getCountryName();
-
- //authorInfo += _("IDS_IM_WIDGET_COUNTRY_NAME");
- authorInfo += _("WIDGET COUNTRY NAME");
- authorInfo += LABEL_NEW_LINE;
-
- if (!countryName.IsNull()) {
- authorInfo += DPL::ToUTF8String(*countryName);
- } else {
- //authorInfo += _("IDS_IM_WIDGET_COUNTRY_UNKNOWN");
- authorInfo += _("WIDGET COUNTRY UNKNOWN");
- }
- } else {
- authorInfo +=
- //_("IDS_IM_WIDGET_DOES_NOT_CONTAIN_RECOGNIZED_AUTHOR_SIGNATURE");
- _("Widget does not contain recognized author signature");
- }
- return authorInfo;
-}
-
-void TaskCertify::stepAuthorInfoPopup()
-{
- LogInfo("Step:: <<Author Popup Information>>");
- std::string label
- = createAuthorWidgetInfo() + LABEL_NEW_LINE_2 + QUESTION;
- createInstallPopup(PopupType::WIDGET_AUTHOR_INFO, label);
-}
-