From 64a5a79186b08dd76266f7d161f0264a4618337d Mon Sep 17 00:00:00 2001 From: "sangwan.kwon" Date: Fri, 1 Jul 2016 13:44:25 +0900 Subject: [PATCH] Add exception handling on cchecker call logic Change-Id: I89611282c0557c65f81a63106edb9581d1cca4cf Signed-off-by: sangwan.kwon --- vcore/vcore/SignatureValidator.cpp | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/vcore/vcore/SignatureValidator.cpp b/vcore/vcore/SignatureValidator.cpp index 8c60759..b5fc25c 100644 --- a/vcore/vcore/SignatureValidator.cpp +++ b/vcore/vcore/SignatureValidator.cpp @@ -407,13 +407,18 @@ VCerr SignatureValidator::Impl::baseCheck( return E_SIG_INVALID_FORMAT; } catch (const Ocsp::Exception::OcspUnsupported &e) { LogInfo("Ocsp unsupported : " << e.DumpToString()); - return E_SIG_NONE; } catch (const Ocsp::Exception::Base &e) { LogInfo("Ocsp check throw exeption : " << e.DumpToString()); #ifdef TIZEN_PROFILE_MOBILE LogInfo("Launch cert-checker."); - if (cchecker_ocsp_request() != 0) - LogError("Load cert-checker failed."); + try { + if (cchecker_ocsp_request() != 0) + LogError("Load cert-checker failed."); + } catch (const std::exception &e) { + LogError("std exception occured while cchecker running : " << e.what()); + } catch (...) { + LogError("Unknown exception occuured while cchecker running. "); + } #endif } catch (const std::exception &e) { LogError("std exception occured : " << e.what()); @@ -469,13 +474,18 @@ VCerr SignatureValidator::Impl::baseCheckList( return E_SIG_INVALID_FORMAT; } catch (const Ocsp::Exception::OcspUnsupported &e) { LogInfo("Ocsp unsupported : " << e.DumpToString()); - return E_SIG_NONE; } catch (const Ocsp::Exception::Base &e) { LogInfo("Ocsp check throw exeption : " << e.DumpToString()); #ifdef TIZEN_PROFILE_MOBILE LogInfo("Launch cert-checker."); - if (cchecker_ocsp_request() != 0) - LogError("Load cert-checker failed."); + try { + if (cchecker_ocsp_request() != 0) + LogError("Load cert-checker failed."); + } catch (const std::exception &e) { + LogError("std exception occured while cchecker running : " << e.what()); + } catch (...) { + LogError("Unknown exception occuured while cchecker running. "); + } #endif } catch (...) { LogError("Unknown exception in SignatureValidator::checkList"); -- 2.7.4