Interface XMLSignatureContextFactory

All Known Implementing Classes:
DefaultXMLSignatureContextFactory

public interface XMLSignatureContextFactory
Provides a factory that provides an implementation of the PDFSignatureContext interface

The PDFSignatureContext interface provides a standard set of functions that can be used to determine the state of a PDF document before and after it was signed such as:

  • Extract the version of the document that was signed by a particular signature
  • Determine if a document has non signature updates applied to the document after the document was signed
  • Determine if a signature covers the visual content that is shown if the full document is displayed

The logic provided by a PDFSignatureContext implementation can be a moving target and also policy driven. The PDF signature validator needs an implementation of this factory to provide it with a current and relevant version to determine the validity of the signature and whether the signature covers the whole document

Author:
Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
  • Method Details

    • getSignatureContext

      XMLSignatureContext getSignatureContext(Document document) throws IOException
      Provide a PDF signature context object for a particular PDF document. This signature context object can be used to determine signature validity and whether a signature in the document covers the whole document.
      Parameters:
      document - the target XML document
      Returns:
      an implementatioin of the XMLSignatureContext interface
      Throws:
      IOException - error parsing the provided PDF document