Class OnlineTSPSource

java.lang.Object
eu.europa.esig.dss.service.tsp.OnlineTSPSource
All Implemented Interfaces:
eu.europa.esig.dss.spi.x509.tsp.TSPSource, Serializable

public class OnlineTSPSource extends Object implements eu.europa.esig.dss.spi.x509.tsp.TSPSource
Class encompassing a RFC 3161 TSA, accessed through HTTP(S) to a given URI
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    The default constructor for OnlineTSPSource.
    Builds an OnlineTSPSource that will query the specified URL with default TimestampDataLoader
    OnlineTSPSource(String tspServer, eu.europa.esig.dss.spi.client.http.DataLoader dataLoader)
    Builds an OnlineTSPSource that will query the URL and the specified DataLoader
  • Method Summary

    Modifier and Type
    Method
    Description
    eu.europa.esig.dss.model.TimestampBinary
    getTimeStampResponse(eu.europa.esig.dss.enumerations.DigestAlgorithm digestAlgorithm, byte[] digest)
     
    void
    setDataLoader(eu.europa.esig.dss.spi.client.http.DataLoader dataLoader)
    Set the DataLoader to use for querying the TSP server.
    void
    Set the NonceSource to use for querying the TSP server.
    void
    setPolicyOid(String policyOid)
    Set the request policy
    void
    setTspServer(String tspServer)
    Set the URL of the TSA

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • OnlineTSPSource

      public OnlineTSPSource()
      The default constructor for OnlineTSPSource.
    • OnlineTSPSource

      public OnlineTSPSource(String tspServer)
      Builds an OnlineTSPSource that will query the specified URL with default TimestampDataLoader
      Parameters:
      tspServer - the tsp URL
    • OnlineTSPSource

      public OnlineTSPSource(String tspServer, eu.europa.esig.dss.spi.client.http.DataLoader dataLoader)
      Builds an OnlineTSPSource that will query the URL and the specified DataLoader
      Parameters:
      tspServer - the tsp URL
      dataLoader - DataLoader to retrieve the TSP
  • Method Details

    • setTspServer

      public void setTspServer(String tspServer)
      Set the URL of the TSA
      Parameters:
      tspServer - the TSA url
    • setPolicyOid

      public void setPolicyOid(String policyOid)
      Set the request policy
      Parameters:
      policyOid - the policy oid to use
    • setDataLoader

      public void setDataLoader(eu.europa.esig.dss.spi.client.http.DataLoader dataLoader)
      Set the DataLoader to use for querying the TSP server.
      Parameters:
      dataLoader - the component that allows to retrieve the TSP response using HTTP.
    • setNonceSource

      public void setNonceSource(NonceSource nonceSource)
      Set the NonceSource to use for querying the TSP server.
      Parameters:
      nonceSource - the component that prevents the replay attack.
    • getTimeStampResponse

      public eu.europa.esig.dss.model.TimestampBinary getTimeStampResponse(eu.europa.esig.dss.enumerations.DigestAlgorithm digestAlgorithm, byte[] digest) throws eu.europa.esig.dss.model.DSSException
      Specified by:
      getTimeStampResponse in interface eu.europa.esig.dss.spi.x509.tsp.TSPSource
      Throws:
      eu.europa.esig.dss.model.DSSException