Class XAdESTrustedListUtils

java.lang.Object
eu.europa.esig.dss.xades.tsl.XAdESTrustedListUtils

public final class XAdESTrustedListUtils extends Object
This class contains utils for a XAdES signature creation of an XML Trusted List
  • Field Details

    • TL_V5_IDENTIFIER

      public static final Integer TL_V5_IDENTIFIER
      Identifier used for a TL version 5
    • TL_V6_IDENTIFIER

      public static final Integer TL_V6_IDENTIFIER
      Identifier used for a TL version 6
    • TL_VERSION_IDENTIFIER_PATH

      public static final String TL_VERSION_IDENTIFIER_PATH
      The path to reach a tl:NextUpdate element
      See Also:
  • Method Details

    • getTSLVersionIdentifier

      public static Integer getTSLVersionIdentifier(Document documentDom)
      Parses the XML Trusted List and returns the TL version, when present
      Parameters:
      documentDom - Document to parse
      Returns:
      Integer XML Trusted List version
    • 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 given DSSDocument. 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 validated
      targetTLVersion - 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 given Document. 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 validated
      targetTLVersion - 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