Package eu.emi.security.authn.x509
Class ValidationError
java.lang.Object
eu.emi.security.authn.x509.ValidationError
Holds information about a single validation problem with a reference to
the certificate chain.
Each error may refer to particular certificate in the chain, contains an unique
code and a coarse grained category.
- Author:
- K. Benedyczak
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionValidationError
(X509Certificate[] chain, int position, ValidationErrorCode errorCode, Object... params) -
Method Summary
Modifier and TypeMethodDescriptiongetChain()
Returns a coarse grained error category.Gets the unique error code.Returns human readable message describing this error.Object[]
Gets the error parameters.int
Returns position in chain of the certificate causing the error.static String
static String
toString()
-
Constructor Details
-
ValidationError
public ValidationError(X509Certificate[] chain, int position, ValidationErrorCode errorCode, Object... params)
-
-
Method Details
-
makeReasonFromStack
-
makeReason
-
getPosition
public int getPosition()Returns position in chain of the certificate causing the error. If the error is related to chain inconsistency (so more then one certificate is involved) then the lowest number of the certificate involved must be returned.- Returns:
- position of the erroneous certificate in chain or -1 if not defied.
-
getMessage
Returns human readable message describing this error. The message is formatted in accordance to the current locale settings.- Returns:
- the error message
-
getErrorCode
Gets the unique error code. Error codes are defined in bundle with messages (in a properties file).- Returns:
- the error code
-
getParameters
Gets the error parameters.- Returns:
- the error parameters
-
getErrorCategory
Returns a coarse grained error category.- Returns:
- error category
-
getChain
- Returns:
- the certificate chain which caused the validation error
-
toString
-