From: jc815.lee Date: Mon, 2 Sep 2013 07:30:49 +0000 (+0900) Subject: Remove Logs when install certificates X-Git-Tag: submit/tizen/20131210.080830^2^2~120 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bfaf383d31d7c19a62e541f5305beab5c9a16737;p=platform%2Fframework%2Fnative%2Fappfw.git Remove Logs when install certificates [model] [binary_type] [customer] [issue#] [problem] [cause] [solution] [team] [request] [horizontal_expansion] Change-Id: I2dd306f0de9e698007fc16965094be0184918117 Signed-off-by: jc815.lee --- diff --git a/src/security/cert/FSecCert_CertDbManager.cpp b/src/security/cert/FSecCert_CertDbManager.cpp index 5428061..08f5916 100755 --- a/src/security/cert/FSecCert_CertDbManager.cpp +++ b/src/security/cert/FSecCert_CertDbManager.cpp @@ -280,9 +280,14 @@ _CertDbManager::InsertCaCertificateFromBuffer(_CaCertType certType, _CertFormat } r = __caCertDbStore.CheckDuplicateCertificate(certType, reinterpret_cast< byte* >(subjectName), lenSubjectName); - SysTryReturnResult(NID_SEC_CERT, IsFailed(r), E_FILE_ALREADY_EXIST, "File already exists."); + if(!IsFailed(r)) + { + return E_FILE_ALREADY_EXIST; + } + SysTryReturnResult(NID_SEC_CERT, r==E_DATA_NOT_FOUND, r, "Failed to check duplicate"); + //Get the last installed certificate id from db table __caCertDbStore.GetCurrentCertId(certId); //Calculate the new (std::nothrow) certificate id for installation diff --git a/src/security/cert/FSecCert_CertDbStore.cpp b/src/security/cert/FSecCert_CertDbStore.cpp index 1e760da..0e2ee04 100644 --- a/src/security/cert/FSecCert_CertDbStore.cpp +++ b/src/security/cert/FSecCert_CertDbStore.cpp @@ -564,7 +564,10 @@ _CaCertDbStore::CheckDuplicateCertificate(_CaCertType certType, byte* pSubjectNa std::unique_ptr< DbEnumerator > pEnum(pDatabase->QueryN(statement)); r = GetLastResult(); SysTryReturnResult(NID_SEC_CERT, !IsFailed(r) , r, "Failed to get query result."); - SysTryReturnResult(NID_SEC_CERT, pEnum != null , E_DATA_NOT_FOUND, "No certificate found in database."); + if(pEnum == null) + { + r = E_DATA_NOT_FOUND; + } return r; } diff --git a/src/security/cert/FSecCert_CertFileStore.cpp b/src/security/cert/FSecCert_CertFileStore.cpp index 4547675..9ff66dd 100644 --- a/src/security/cert/FSecCert_CertFileStore.cpp +++ b/src/security/cert/FSecCert_CertFileStore.cpp @@ -225,8 +225,6 @@ _CertFileStore::GetFileNameFromHandle(CertIdNo hCert, _CertPathType pathType, St fileName.Append(tempStr); fileName.Append(extn); - SysSecureLog(NID_SEC_CERT, "GetFileNameFromHandle(Handle = %d): File name = %ls.", - hCert, fileName.GetPointer()); return E_SUCCESS; }