Class TSAClient

java.lang.Object
org.apache.pdfbox.examples.signature.TSAClient

public class TSAClient extends Object
Time Stamping Authority (TSA) Client [RFC 3161].
  • Field Details

    • LOG

      private static final org.apache.commons.logging.Log LOG
    • ALGORITHM_OID_FINDER

      private static final org.bouncycastle.operator.DigestAlgorithmIdentifierFinder ALGORITHM_OID_FINDER
    • url

      private final URL url
    • username

      private final String username
    • password

      private final String password
    • digest

      private final MessageDigest digest
    • RANDOM

      private static final Random RANDOM
  • Constructor Details

    • TSAClient

      public TSAClient(URL url, String username, String password, MessageDigest digest)
      Parameters:
      url - the URL of the TSA service
      username - user name of TSA
      password - password of TSA
      digest - the message digest to use
  • Method Details

    • getTimeStampToken

      public org.bouncycastle.tsp.TimeStampToken getTimeStampToken(InputStream content) throws IOException
      Parameters:
      content -
      Returns:
      the time stamp token
      Throws:
      IOException - if there was an error with the connection or data from the TSA server, or if the time stamp response could not be validated
    • getTSAResponse

      private byte[] getTSAResponse(byte[] request) throws IOException
      Throws:
      IOException