From 46e07939c73a00ea5e30d52c1a030d3ad5967ad4 Mon Sep 17 00:00:00 2001 From: Kyungwook Tak Date: Tue, 24 Nov 2015 16:53:32 +0900 Subject: [PATCH] Error code added on vcore Change-Id: I303769a38510edb073959c249c521ce0eabecdae Signed-off-by: Kyungwook Tak --- vcore/vcore/Error.h | 17 +++++++++-------- vcore/vcore/SignatureValidator.cpp | 7 ++++--- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/vcore/vcore/Error.h b/vcore/vcore/Error.h index 3f79543..358f5c5 100644 --- a/vcore/vcore/Error.h +++ b/vcore/vcore/Error.h @@ -29,14 +29,15 @@ const VCerr E_SIG_NONE = 0; const VCerr E_SIG_INVALID_FORMAT = -1; const VCerr E_SIG_INVALID_CERT = -2; const VCerr E_SIG_INVALID_CHAIN = -3; -const VCerr E_SIG_INVALID_REF = -4; -const VCerr E_SIG_CERT_EXPIRED = -5; -const VCerr E_SIG_CERT_NOT_YET = -6; -const VCerr E_SIG_DISREGARDED = -7; -const VCerr E_SIG_REVOKED = -8; -const VCerr E_SIG_PLUGIN = -9; -const VCerr E_SIG_OUT_OF_MEM = -10; -const VCerr E_SIG_UNKNOWN = -11; +const VCerr E_SIG_INVALID_SIG = -4; +const VCerr E_SIG_INVALID_REF = -5; +const VCerr E_SIG_CERT_EXPIRED = -6; +const VCerr E_SIG_CERT_NOT_YET = -7; +const VCerr E_SIG_DISREGARDED = -8; +const VCerr E_SIG_REVOKED = -9; +const VCerr E_SIG_PLUGIN = -10; +const VCerr E_SIG_OUT_OF_MEM = -11; +const VCerr E_SIG_UNKNOWN = -12; const VCerr E_SCOPE_FIRST = E_SIG_INVALID_FORMAT; const VCerr E_SCOPE_LAST = E_SIG_UNKNOWN; diff --git a/vcore/vcore/SignatureValidator.cpp b/vcore/vcore/SignatureValidator.cpp index 25876c0..5dc2f07 100644 --- a/vcore/vcore/SignatureValidator.cpp +++ b/vcore/vcore/SignatureValidator.cpp @@ -505,11 +505,12 @@ std::string SignatureValidator::Impl::errorToString(VCerr code) case E_SIG_INVALID_FORMAT: return "Invalid format of signature file."; case E_SIG_INVALID_CERT: return "Invalid format of certificate in signature."; case E_SIG_INVALID_CHAIN: return "Invalid certificate chain with certificate in signature."; - case E_SIG_INVALID_REF: return "Invalid object reference in signature. Files in app should not be changed after app packaged."; - case E_SIG_CERT_EXPIRED: return "Certificate in signature is expired."; + case E_SIG_INVALID_SIG: return "Invalid signature. Signed with wrong key, changed signature file or changed package file."; + case E_SIG_INVALID_REF: return "Invalid file reference. An unsinged file was found."; + case E_SIG_CERT_EXPIRED: return "Certificate in signature was expired."; case E_SIG_CERT_NOT_YET: return "Certificate in signature is not valid yet."; case E_SIG_DISREGARDED: return "Signature validation can be disregarded in some cases."; - case E_SIG_REVOKED: return "One of certificate is revoked in certificate chain."; + case E_SIG_REVOKED: return "One of certificate was revoked in certificate chain."; case E_SIG_PLUGIN: return "Failed to load plugin for additional validation check."; case E_SIG_OUT_OF_MEM: return "Out of memory."; case E_SIG_UNKNOWN: return "Unknown error."; -- 2.7.4