fixed failing to install user certificate
authorso.yu <so.yu@samsung.com>
Fri, 29 Mar 2013 08:25:44 +0000 (17:25 +0900)
committerso.yu <so.yu@samsung.com>
Fri, 29 Mar 2013 08:25:55 +0000 (17:25 +0900)
Change-Id: I011f1c2a2a43e42718e6fbd0cbfa074010781b28
Signed-off-by: so.yu <so.yu@samsung.com>
inc/CertificateServiceStub.h [changed mode: 0644->0755]
src/CertificateServiceStub.cpp [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 2d2a5a3..32d6892
@@ -86,7 +86,7 @@ public:
 
        bool OnInsertCertificateChainWithPrivateKey(Tizen::Io::_IpcBuffer certChainPrivateKeyBufferIpc, int certChainPrivateKeyLength, result* pRet);
 
-       bool OnInstallPkcs12Content(Tizen::Io::_IpcBuffer pkcs12FilePath, Tizen::Io::_IpcBuffer pkcs12ImportPassword, result* pRet);
+       bool OnInstallPkcs12Content(Tizen::Io::_IpcBuffer pkcs12FilePath, Tizen::Io::_IpcBuffer pkcs12ImportPassword, bool checkPrivilege, result* pRet);
 
        bool OnDeleteUserCertChainByCertId(int certID, result* pRet);
 
old mode 100644 (file)
new mode 100755 (executable)
index 9b3aa9f..c322b8f
@@ -205,12 +205,15 @@ _CertServiceStub::OnInsertCertificateChainWithPrivateKey(Tizen::Io::_IpcBuffer c
 }
 
 bool
-_CertServiceStub::OnInstallPkcs12Content(Tizen::Io::_IpcBuffer pkcs12FilePath, Tizen::Io::_IpcBuffer pkcs12ImportPassword, result* pRet)
+_CertServiceStub::OnInstallPkcs12Content(Tizen::Io::_IpcBuffer pkcs12FilePath, Tizen::Io::_IpcBuffer pkcs12ImportPassword, bool checkPrivilege, result* pRet)
 {
        result r = E_SUCCESS;
 
-       *pRet = _AccessController::CheckSystemPrivilege(__pIpcServer->GetClientAppId(), _PRV_CERTIFICATE_WRITE);
-       TryCatchResult(!IsFailed(*pRet), *pRet = E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
+       if(checkPrivilege == true)
+       {
+               *pRet = _AccessController::CheckSystemPrivilege(__pIpcServer->GetClientAppId(), _PRV_CERTIFICATE_WRITE);
+               TryCatchResult(!IsFailed(*pRet), *pRet = E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
+       }
 
        *pRet = _CertServer::InsertPkcs12Content(static_cast< char* >(pkcs12FilePath.pBuffer), static_cast< char* >(pkcs12ImportPassword.pBuffer));