std::string SignatureValidator::Impl::errorToString(VCerr code)
{
switch (code) {
- case E_SIG_NONE: return "E_SIG_NONE";
- case E_SIG_INVALID_FORMAT: return "E_SIG_INVALID_FORMAT";
- case E_SIG_INVALID_CERT: return "E_SIG_INVALID_CERT";
- case E_SIG_INVALID_CHAIN: return "E_SIG_INVALID_CHAIN";
- case E_SIG_INVALID_REF: return "E_SIG_INVALID_REF";
- case E_SIG_CERT_EXPIRED: return "E_SIG_CERT_EXPIRED";
- case E_SIG_CERT_NOT_YET: return "E_SIG_CERT_NOT_YET";
- case E_SIG_DISREGARDED: return "E_SIG_DISREGARDED";
- case E_SIG_REVOKED: return "E_SIG_REVOKED";
- case E_SIG_PLUGIN: return "E_SIG_PLUGIN";
- case E_SIG_OUT_OF_MEM: return "E_SIG_OUT_OF_MEM";
- case E_SIG_UNKNOWN: return "E_SIG_UNKNOWN";
+ case E_SIG_NONE: return "Success.";
+ 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_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_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.";
default: return m_pluginHandler.errorToString(code);
}
}