Remove Logs when install certificates
authorjc815.lee <jc815.lee@samsung.com>
Mon, 2 Sep 2013 07:30:49 +0000 (16:30 +0900)
committerjc815.lee <jc815.lee@samsung.com>
Wed, 4 Sep 2013 01:04:40 +0000 (10:04 +0900)
[model]
[binary_type]
[customer]
[issue#]
[problem]
[cause]
[solution]
[team]
[request]
[horizontal_expansion]

Change-Id: I2dd306f0de9e698007fc16965094be0184918117
Signed-off-by: jc815.lee <jc815.lee@samsung.com>
src/security/cert/FSecCert_CertDbManager.cpp
src/security/cert/FSecCert_CertDbStore.cpp
src/security/cert/FSecCert_CertFileStore.cpp

index 5428061..08f5916 100755 (executable)
@@ -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
index 1e760da..0e2ee04 100644 (file)
@@ -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;
 }
index 4547675..9ff66dd 100644 (file)
@@ -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;
 }