Package eu.europa.esig.dss.xades.tsl
Class TLStructureVerifier
java.lang.Object
eu.europa.esig.dss.xades.tsl.TLStructureVerifier
This class verifies conformity of a TL to the defined TLVersion.
NOTE: The class currently handles validation of only V5 and V6 Trusted List versions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsetAcceptedTLVersions
(List<Integer> acceptedTLVersions) Sets a list of acceptable TL version.setSigningMode
(boolean signingMode) Sets whether the current operation is the XML Trusted List signing.validate
(DSSDocument dssDocument, Integer tlVersion) This method validates the Trusted List's conformity to the specified TLVersionThis method validates the Trusted List's conformity to the specified TLVersionvalidateTrustedListV5
(Document document) This method validates the Trusted List XML document against the TL V5 definitionvalidateTrustedListV6
(Document document) This method validates the Trusted List XML document against the TL V6 definition
-
Constructor Details
-
TLStructureVerifier
public TLStructureVerifier()Default constructor. Accepts TL V5 and TL V6
-
-
Method Details
-
setAcceptedTLVersions
Sets a list of acceptable TL version. When defined, an error message will be produces for Trusted Lists with a different version.- Parameters:
acceptedTLVersions
- a list ofInteger
s, containing acceptable TL versions- Returns:
- this
TLStructureVerifier
-
setSigningMode
Sets whether the current operation is the XML Trusted List signing. If enabled, verifies that no ds:Signature element is present within the XML Trusted List. Otherwise, verifies presence and validity of the ds:Signature element. Default : FALSE (verifies that the signature is not present)- Parameters:
signingMode
- whether the validation is performed for the XML Trusted List signing- Returns:
- this
TLStructureVerifier
-
validate
This method validates the Trusted List's conformity to the specified TLVersion- Parameters:
dssDocument
-DSSDocument
XML Trusted List to be validatedtlVersion
-Integer
the version of the Trusted List to validatedocument
against- Returns:
- a list of
String
s indicating errors occurred during the conformity evaluation
-
validate
This method validates the Trusted List's conformity to the specified TLVersion -
validateTrustedListV5
This method validates the Trusted List XML document against the TL V5 definition -
validateTrustedListV6
This method validates the Trusted List XML document against the TL V6 definition
-