Fixed skip to validate a signature
authorSoyoung Kim <sy037.kim@samsung.com>
Thu, 14 Feb 2013 10:13:35 +0000 (19:13 +0900)
committerSoyoung Kim <sy037.kim@samsung.com>
Thu, 14 Feb 2013 10:13:35 +0000 (19:13 +0900)
[Issue#] N/A
[Problem] occure crash during RDS update
[Cause] side effect from skip to validate a signature.
[Solution] Fixed validate signature logic.
[SCMRequest] N/A

src/jobs/widget_install/task_certify.cpp

index 9b2d1b9..342b5f4 100644 (file)
@@ -229,22 +229,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) {