Signature path bug fix when install by directory mode.
authorTaejeong Lee <taejeong.lee@samsung.com>
Fri, 1 Feb 2013 12:35:07 +0000 (21:35 +0900)
committerGerrit Code Review <gerrit2@kim11>
Wed, 6 Feb 2013 04:44:00 +0000 (13:44 +0900)
 * Wrong signature path was used.

[Issue#] N/A
[Problem] widget's signature policy identification fail.
[Cause] Wrong signature path was used.
[Solution] Fixed.

Change-Id: Ic5f2d85e2deb3750aa8aa973f3354e2e3354a153

src/jobs/widget_install/task_certify.cpp [changed mode: 0755->0644]
src/misc/widget_location.cpp

old mode 100755 (executable)
new mode 100644 (file)
index 40a17cd..4d22aca
@@ -222,14 +222,24 @@ void TaskCertify::stepSignature()
                 appType = WrtSignatureValidator::TIZEN;
             }
 
-            WrtSignatureValidator validator(
-                appType,
-                !GlobalSettings::OCSPTestModeEnabled(),
-                !GlobalSettings::CrlTestModeEnabled(),
-                complianceMode);
-
-            WrtSignatureValidator::Result result =
-                validator.check(data, widgetPath);
+            WrtSignatureValidator::Result result;
+
+            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) {
                 LogWarning("Certificate is REVOKED");
index e4bd94e..cefdb31 100644 (file)
@@ -173,7 +173,7 @@ std::string WidgetLocation::getTemporaryPackageDir() const
 std::string WidgetLocation::getTemporaryRootDir() const
 {
     if (m_type == WrtDB::PKG_TYPE_DIRECTORY_WEB_APP) {
-        return getWidgetSource();
+        return getWidgetSource() + WrtDB::GlobalConfig::GetWidgetSrcPath();
     }
     if(m_type == WrtDB::PKG_TYPE_HYBRID_WEB_APP)
     {