Package eu.europa.esig.dss.service.tsp
Class OnlineTSPSource
- java.lang.Object
-
- eu.europa.esig.dss.service.tsp.OnlineTSPSource
-
- All Implemented Interfaces:
TSPSource,Serializable
public class OnlineTSPSource extends Object implements TSPSource
Class encompassing a RFC 3161 TSA, accessed through HTTP(S) to a given URI- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description OnlineTSPSource()The default constructor for OnlineTSPSource.OnlineTSPSource(String tspServer)Build a OnlineTSPSource that will query the specified URL
-
Method Summary
Modifier and Type Method Description org.bouncycastle.tsp.TimeStampTokengetTimeStampResponse(DigestAlgorithm digestAlgorithm, byte[] digest)Gets a TimeStampResponse relevant to the provided digestvoidsetDataLoader(DataLoader dataLoader)Set the DataLoader to use for querying the TSP server.voidsetNonceSource(NonceSource nonceSource)Set the NonceSource to use for querying the TSP server.voidsetPolicyOid(String policyOid)Set the request policyvoidsetTspServer(String tspServer)Set the URL of the TSA
-
-
-
Constructor Detail
-
OnlineTSPSource
public OnlineTSPSource()
The default constructor for OnlineTSPSource.
-
OnlineTSPSource
public OnlineTSPSource(String tspServer)
Build a OnlineTSPSource that will query the specified URL- Parameters:
tspServer- the tsp URL
-
-
Method Detail
-
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(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 org.bouncycastle.tsp.TimeStampToken getTimeStampResponse(DigestAlgorithm digestAlgorithm, byte[] digest) throws DSSException
Description copied from interface:TSPSourceGets a TimeStampResponse relevant to the provided digest- Specified by:
getTimeStampResponsein interfaceTSPSource- Parameters:
digestAlgorithm- the used digest algorithmdigest- the computed digest to be timestamped- Returns:
- a signed timestamp token
- Throws:
DSSException- if any error occurred
-
-