Package com.microej.util.appverifier
Class AppVerifierErrorMessages
- java.lang.Object
-
- com.microej.util.appverifier.AppVerifierErrorMessages
-
public class AppVerifierErrorMessages extends Object
Defines the error message identifiers reported by the application verifier and builds their messages.- Since:
- 1.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static StringAPPVERIFIER_LOG_ENABLEDThe BON constant to enable or disable logs.static StringAPPVERIFIER_TRUSTED_CAS_PATHThe BON constant holding the storage ID of the trusted CAs file loaded byDefaultCertificateChainValidator.fromResource().static StringCATEGORYError messages category.static intCERTIFICATE_CHAIN_VERIFIED_NOT_AUTHORIZEDThe certificate chain was verified but not authorized.static StringCERTIFICATE_TYPE_X509The X.509 certificate type, as passed toCertificateFactory.getInstance(String).static intINCONSISTENT_LENGTHThe length of the input stream is inconsistent.static intINVALID_APPLICATION_FORMATThe signed Application format is not valid.static intINVALID_PUBLIC_KEYThe key is null or not a public key.static intINVALID_SIGNATUREThe signature is not valid.static intNO_CERTIFICATEThe certificate is null.static intNO_TRUSTED_CERTIFICATESNo trusted certificates are provided or matched.static intSIGNATURE_VERIFICATION_FAILEDThe verification of the signature has failed (signature object not initialized, signature improperly encoded or of the wrong type, signature algorithm unable to process the input data, etc.).static intUNSUPPORTED_INSTALL_VERSIONThe 'install' request version is not supported.static intUNSUPPORTED_SIGNATURE_ALGORITHMThe signature algorithm is not supported.static intUNSUPPORTED_SIGNED_APPLICATION_VERSIONThe signed Application version is not supported.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetMessage(char level, String category, int id, Object... arguments)Builds the message identified by the given level, category and identifier.
-
-
-
Field Detail
-
APPVERIFIER_LOG_ENABLED
public static final String APPVERIFIER_LOG_ENABLED
The BON constant to enable or disable logs.- See Also:
- Constant Field Values
-
APPVERIFIER_TRUSTED_CAS_PATH
public static final String APPVERIFIER_TRUSTED_CAS_PATH
The BON constant holding the storage ID of the trusted CAs file loaded byDefaultCertificateChainValidator.fromResource().- See Also:
- Constant Field Values
-
INVALID_APPLICATION_FORMAT
public static final int INVALID_APPLICATION_FORMAT
The signed Application format is not valid.- See Also:
- Constant Field Values
-
UNSUPPORTED_SIGNED_APPLICATION_VERSION
public static final int UNSUPPORTED_SIGNED_APPLICATION_VERSION
The signed Application version is not supported.- See Also:
- Constant Field Values
-
UNSUPPORTED_INSTALL_VERSION
public static final int UNSUPPORTED_INSTALL_VERSION
The 'install' request version is not supported.- See Also:
- Constant Field Values
-
UNSUPPORTED_SIGNATURE_ALGORITHM
public static final int UNSUPPORTED_SIGNATURE_ALGORITHM
The signature algorithm is not supported.- See Also:
- Constant Field Values
-
INCONSISTENT_LENGTH
public static final int INCONSISTENT_LENGTH
The length of the input stream is inconsistent.- See Also:
- Constant Field Values
-
INVALID_SIGNATURE
public static final int INVALID_SIGNATURE
The signature is not valid.- See Also:
- Constant Field Values
-
NO_TRUSTED_CERTIFICATES
public static final int NO_TRUSTED_CERTIFICATES
No trusted certificates are provided or matched.- See Also:
- Constant Field Values
-
SIGNATURE_VERIFICATION_FAILED
public static final int SIGNATURE_VERIFICATION_FAILED
The verification of the signature has failed (signature object not initialized, signature improperly encoded or of the wrong type, signature algorithm unable to process the input data, etc.).- See Also:
- Constant Field Values
-
CERTIFICATE_CHAIN_VERIFIED_NOT_AUTHORIZED
public static final int CERTIFICATE_CHAIN_VERIFIED_NOT_AUTHORIZED
The certificate chain was verified but not authorized.- See Also:
- Constant Field Values
-
INVALID_PUBLIC_KEY
public static final int INVALID_PUBLIC_KEY
The key is null or not a public key.- See Also:
- Constant Field Values
-
NO_CERTIFICATE
public static final int NO_CERTIFICATE
The certificate is null.- See Also:
- Constant Field Values
-
CATEGORY
public static final String CATEGORY
Error messages category.- See Also:
- Constant Field Values
-
CERTIFICATE_TYPE_X509
public static final String CERTIFICATE_TYPE_X509
The X.509 certificate type, as passed toCertificateFactory.getInstance(String).- See Also:
- Constant Field Values
-
-
Method Detail
-
getMessage
public static String getMessage(char level, String category, int id, Object... arguments)
Builds the message identified by the given level, category and identifier.- Parameters:
level- the message level (seeLevel).category- the message category.id- the message identifier.arguments- the arguments to include in the message, if any.- Returns:
- the built message.
-
-