Package eu.europa.esig.dss.xades.tsl
Class XAdESTrustedListUtils
java.lang.Object
eu.europa.esig.dss.xades.tsl.XAdESTrustedListUtils
This class contains utils for a XAdES signature creation of an XML Trusted List
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic Integer
getTSLVersionIdentifier
(Document documentDom) Parses the XML Trusted List and returns the TL version, when presentvalidateUnsignedTrustedList
(DSSDocument tlDocument, int targetTLVersion) This method helps to determine whether the chosen signature parameters builders is applicable to the givenDSSDocument
.validateUnsignedTrustedList
(Document documentDom, int targetTLVersion) This method helps to determine whether the chosen signature parameters builders is applicable to the givenDocument
.
-
Field Details
-
TL_V5_IDENTIFIER
Identifier used for a TL version 5 -
TL_V6_IDENTIFIER
Identifier used for a TL version 6 -
TL_VERSION_IDENTIFIER_PATH
The path to reach a tl:NextUpdate element- See Also:
-
-
Method Details
-
getTSLVersionIdentifier
Parses the XML Trusted List and returns the TL version, when present -
validateUnsignedTrustedList
public static List<String> validateUnsignedTrustedList(DSSDocument tlDocument, int targetTLVersion) throws IllegalInputException This method helps to determine whether the chosen signature parameters builders is applicable to the givenDSSDocument
. Thus, it verifies whether the provided document representing the XML Trusted List is conformant to the definition and the target version. Returns a list of errors if problems have been found during the validation. Returns an empty list in case of a valid XML Trusted List conformant to the specified version.- Parameters:
tlDocument
-DSSDocument
the XML Trusted List document to be validatedtargetTLVersion
- the target XML Trusted List version (e.g., "5")- Returns:
- a list of
String
messages in case of issues on validation, empty list for a passed validation - Throws:
IllegalInputException
-
validateUnsignedTrustedList
public static List<String> validateUnsignedTrustedList(Document documentDom, int targetTLVersion) throws IllegalInputException This method helps to determine whether the chosen signature parameters builders is applicable to the givenDocument
. Thus, it verifies whether the provided document representing the XML Trusted List is conformant to the definition and the target version. Returns a list of errors if problems have been found during the validation. Returns an empty list in case of a valid XML Trusted List conformant to the specified version.- Parameters:
documentDom
-Document
the XML Trusted List document to be validatedtargetTLVersion
- the target XML Trusted List version (e.g., "5")- Returns:
- a list of
String
messages in case of issues on validation, empty list for a passed validation - Throws:
IllegalInputException
-