Class XAdESSignatureFacet

java.lang.Object
org.apache.poi.poifs.crypt.dsig.facets.XAdESSignatureFacet
All Implemented Interfaces:
SignatureFacet

public class XAdESSignatureFacet extends Object implements SignatureFacet
XAdES Signature Facet. Implements XAdES v1.4.1 which is compatible with XAdES v1.3.2. The implemented XAdES format is XAdES-BES/EPES. It's up to another part of the signature service to upgrade the XAdES-BES to a XAdES-X-L. This implementation has been tested against an implementation that participated multiple ETSI XAdES plugtests.
See Also:
  • Constructor Details

    • XAdESSignatureFacet

      public XAdESSignatureFacet()
  • Method Details

    • preSign

      public void preSign(SignatureInfo signatureInfo, Document document, List<Reference> references, List<XMLObject> objects) throws XMLSignatureException
      Description copied from interface: SignatureFacet
      This method is being invoked by the XML signature service engine during pre-sign phase. Via this method a signature facet implementation can add signature facets to an XML signature.
      Specified by:
      preSign in interface SignatureFacet
      Parameters:
      signatureInfo - the signature info object holding the OPCPackage and other document related data
      document - the signature document to be used for imports
      references - list of reference definitions
      objects - objects to be signed/included in the signature document
      Throws:
      XMLSignatureException
    • addMimeType

      public void addMimeType(String dsReferenceUri, String mimetype)
      Adds a mime-type for the given ds:Reference (referred via its @URI). This information is added via the xades:DataObjectFormat element.
      Parameters:
      dsReferenceUri - the reference uri
      mimetype - the mimetype