From: so.yu Date: Fri, 28 Jun 2013 00:14:46 +0000 (+0900) Subject: Check the integrity of first root CA certificate X-Git-Tag: accepted/tizen/20130912.081851^2~180 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=16e515a5d42c576992eccd3c6ed868a67a6e95e4;p=platform%2Fframework%2Fnative%2Fappfw.git Check the integrity of first root CA certificate Change-Id: I8d354b9c69ff2aaf8f679e819ac30d174d80bc25 Signed-off-by: so.yu --- diff --git a/src/security/cert/FSecCert_CertManager.cpp b/src/security/cert/FSecCert_CertManager.cpp index 09a009f..f4a2a7f 100644 --- a/src/security/cert/FSecCert_CertManager.cpp +++ b/src/security/cert/FSecCert_CertManager.cpp @@ -1260,7 +1260,7 @@ _CertManager::CheckRootCaIntegrity(void) r = pCaCertDbStore->GetFirstRecordByConditions(reinterpret_cast< byte* >(condition), &certRecord); SysTryReturn(NID_SEC_CERT, !IsFailed(r), r, r, "[%s] Failed to get first certificate record.", GetErrorMessage(r)); - while ((pCaCertDbStore->GetNextRecordByCondition(reinterpret_cast< byte* >(condition), &certRecord, certRecord.certId)) == E_SUCCESS) + do { std::unique_ptr< File > pFile(null); std::unique_ptr< ByteBuffer > pBuffer(null); @@ -1309,8 +1309,9 @@ _CertManager::CheckRootCaIntegrity(void) r = File::Remove(certPath); SysTryLog(NID_SEC_CERT, !IsFailed(r), "[%s] Propagating.", GetErrorMessage(r)); } + while ((pCaCertDbStore->GetNextRecordByCondition(reinterpret_cast< byte* >(condition), &certRecord, certRecord.certId)) == E_SUCCESS); - return r; + return E_SUCCESS; }