Change DirectoryInstaller signature check logic
authorDuyoung Jang <duyoung.jang@samsung.com>
Fri, 12 Apr 2013 07:13:02 +0000 (16:13 +0900)
committerDuyoung Jang <duyoung.jang@samsung.com>
Fri, 12 Apr 2013 07:13:02 +0000 (16:13 +0900)
Change-Id: I890b771b4f2caed8723d880dc7d9b63ee86bfd7f
Signed-off-by: Duyoung Jang <duyoung.jang@samsung.com>
inc/InstallerDefs.h
src/Installer/DirectoryInstaller.cpp
src/Installer/PreloadedInstaller.cpp
src/XmlHandler/ManifestHandler.cpp

index dd82ea7..730d5aa 100755 (executable)
@@ -23,7 +23,7 @@
 
 #include "InstallerUtil.h"
 
-#define OSP_INSTALLER_VERSION "version=[20130412.1]"
+#define OSP_INSTALLER_VERSION "version=[20130412.2]"
 
 #define DIR_BIN                                L"/bin"
 #define DIR_INFO                       L"/info"
index b1626e9..f008ee2 100755 (executable)
@@ -71,6 +71,14 @@ InstallerError
 DirectoryInstaller::OnInit(void)
 {
        InstallationContext* pContext = GetContext();
+
+       if ((File::IsFileExist(pContext->GetSignatureXmlPath()) == true) &&
+                       (File::IsFileExist(pContext->GetAuthorSignatureXmlPath()) == true))
+       {
+               AppLog("[VerifySignature] VerificationMode ON");
+               pContext->__isVerificationMode = true;
+       }
+
        String installPath = pContext->__installDir;
 
        String newInstallPath;
index 20585de..d1676bc 100755 (executable)
@@ -127,9 +127,6 @@ PreloadedInstaller::OnInit(void)
                srcPath = path + AUTHOR_SIGNATURE_XML_FILE;
                destPath = destRootPath + AUTHOR_SIGNATURE_XML_FILE;
                InstallerUtil::CreateSymlink(srcPath, destPath);
-
-               AppLog("[VerifySignature] VerificationMode ON");
-               pContext->__isVerificationMode = true;
        }
 
        pContext->__installDir = destRootPath;
index dcdf029..a680ae3 100755 (executable)
@@ -407,13 +407,11 @@ ManifestHandler::OnIconsStartElement(void)
        res = system_info_get_value_int(SYSTEM_INFO_KEY_SCREEN_WIDTH, &width);
        if (res != SYSTEM_INFO_ERROR_NONE)
        {
-               fprintf(stderr, "  ## system_info_get_value_int() failed. result = [%d]\n", res);
+               AppLog("system_info_get_value_int(SYSTEM_INFO_KEY_SCREEN_WIDTH) failed. res = [%d]", res);
                defaultIconType = L"Xhigh";
        }
        else
        {
-               fprintf(stderr, "  ## system_info_get_value_int() succeeded. result = [%d]\n", res);
-
                if (width == 480)
                {
                        defaultIconType = L"High";