[Release] wrt-installer_0.1.9
[platform/framework/web/wrt-installer.git] / src / jobs / widget_install / task_certify.cpp
index 9b2d1b9..6b0040f 100644 (file)
@@ -33,7 +33,6 @@
 #include <widget_install/widget_install_errors.h>
 #include <widget_install/widget_install_context.h>
 #include <dpl/log/log.h>
-#include <wrt_error.h>
 #include <dpl/wrt-dao-ro/global_config.h>
 #include "wac_widget_id.h"
 
@@ -99,8 +98,8 @@ namespace Jobs {
 namespace WidgetInstall {
 TaskCertify::TaskCertify(InstallerContext &inCont) :
     DPL::TaskDecl<TaskCertify>(this),
-    m_contextData(inCont),
-    WidgetInstallPopup(inCont)
+    WidgetInstallPopup(inCont),
+    m_contextData(inCont)
 {
     AddStep(&TaskCertify::stepSignature);
 
@@ -229,22 +228,22 @@ void TaskCertify::stepSignature()
 
             WrtSignatureValidator::Result result;
 
+            WrtSignatureValidator validator(
+                    appType,
+                    !GlobalSettings::
+                    OCSPTestModeEnabled(),
+                    !GlobalSettings::
+                    CrlTestModeEnabled(),
+                    complianceMode);
+
+            result = validator.check(data, widgetPath);
+
             if (m_contextData.widgetConfig.packagingType
                 == WrtDB::PKG_TYPE_DIRECTORY_WEB_APP)
             {
                 // In directory installation mode, the validation is skipped.
 
                 result = WrtSignatureValidator::SIGNATURE_VERIFIED;
-            } else {
-                WrtSignatureValidator validator(
-                    appType,
-                    !GlobalSettings::
-                        OCSPTestModeEnabled(),
-                    !GlobalSettings::
-                        CrlTestModeEnabled(),
-                    complianceMode);
-
-                result = validator.check(data, widgetPath);
             }
 
             if (result == WrtSignatureValidator::SIGNATURE_REVOKED) {