Package eu.europa.esig.dss.spi.x509.tsp
Class CompositeTSPSource
- java.lang.Object
-
- eu.europa.esig.dss.spi.x509.tsp.CompositeTSPSource
-
- All Implemented Interfaces:
TSPSource,Serializable
public class CompositeTSPSource extends Object implements TSPSource
This class allows to retrieve a timestamp with different sources. The composite will try all sources until to get a non-empty response. Be careful, all given tspSources MUST accept the same digest algorithm.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CompositeTSPSource()
-
Method Summary
Modifier and Type Method Description org.bouncycastle.tsp.TimeStampTokengetTimeStampResponse(DigestAlgorithm digestAlgorithm, byte[] digestValue)Gets a TimeStampResponse relevant to the provided digestvoidsetTspSources(Map<String,TSPSource> tspSources)This setter allows to provide multiple tspSources.
-
-
-
Method Detail
-
setTspSources
public void setTspSources(Map<String,TSPSource> tspSources)
This setter allows to provide multiple tspSources. Be careful, all given tspSources MUST accept the same digest algorithm.- Parameters:
tspSources- aMapof String and TSPSource with a label and its corresponding source
-
getTimeStampResponse
public org.bouncycastle.tsp.TimeStampToken getTimeStampResponse(DigestAlgorithm digestAlgorithm, byte[] digestValue) throws DSSException
Description copied from interface:TSPSourceGets a TimeStampResponse relevant to the provided digest- Specified by:
getTimeStampResponsein interfaceTSPSource- Parameters:
digestAlgorithm- the used digest algorithmdigestValue- the computed digest to be timestamped- Returns:
- a signed timestamp token
- Throws:
DSSException- if any error occurred
-
-