Add visibility check routine
authorhb.min <hb.min@samsung.com>
Thu, 15 Nov 2012 07:54:01 +0000 (16:54 +0900)
committerhb.min <hb.min@samsung.com>
Thu, 15 Nov 2012 07:54:01 +0000 (16:54 +0900)
Change-Id: Iccc9a266275e381fdc566820b99c7dbe8853d368

src/Step/SignatureStep.cpp
src/XmlHandler/PrivilegeHandler.cpp

index 745e653..c6e7d7a 100755 (executable)
@@ -193,7 +193,7 @@ SignatureStep::OnStateRootCert(void)
 
        AppLogTag(OSP_INSTALLER, "AppId = [%ls], CertType = [%d], ApiVisibility = [%d]", appId.GetPointer(), certType, apiVisibility);
 
-       r = PrivilegeHandler::GenerateCipherPrivilege(appId, *pPrivilegeList, certType, privileges, hmacPrivileges);
+       r = PrivilegeHandler::GenerateCipherPrivilege(appId, *pPrivilegeList, apiVisibility, privileges, hmacPrivileges);
        if (IsFailed(r))
        {
                fprintf(stderr, "PrivilegeHandler::GenerateCipherPrivilege is failded. [%ls][%ls][%ls]\n", appId.GetPointer(), privileges.GetPointer(), hmacPrivileges.GetPointer());
index 9f8c216..75a4872 100755 (executable)
@@ -26,6 +26,7 @@
 #include <FSecCryptoAesCipher.h>
 #include <FSecCryptoSha1Hmac.h>
 #include <FBase_StringConverter.h>
+#include <FBaseInternalTypes.h>
 #include <FSec_AccessControlTypes.h>
 #include <FSec_DeviceKeyGenerator.h>
 
@@ -230,7 +231,7 @@ PrivilegeHandler::PackPrivilegeN(const IList& privilegeList, int visibilityLevel
                                validStringFlag = true;
                                privilegeEnum = static_cast< int >(privilegeListTable[index].privilege);
 
-                               if (visibilityLevel != _VSB_LEVEL_NONE)
+                               if (visibilityLevel != _API_VISIBILITY_NONE)
                                {
                                        if (visibilityLevelListTable[privilegeEnum][_PRV_API_VER_3_0] > visibilityLevel)
                                        {
@@ -254,7 +255,7 @@ PrivilegeHandler::PackPrivilegeN(const IList& privilegeList, int visibilityLevel
 
                if (validLevelFlag == false)
                {
-                       SysLogException(NID_SEC, E_INVALID_ARG, "[E_INVALID_ARG] The application does not have the privilege to register %ls", pTempString->GetPointer());
+                       SysLogException(NID_SEC, E_INVALID_ARG, "[E_INVALID_ARG] The application does not have the visibility to register %ls", pTempString->GetPointer());
                        resultFlag = false;
                }
        }