public abstract class Timestamper extends Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
retries
The number of retries
|
protected int |
retryWait
Seconds to wait between retries
|
protected URL |
tsaurl
The URL of the current timestamping service
|
protected List<URL> |
tsaurls
The URLs of the timestamping services
|
| Constructor and Description |
|---|
Timestamper() |
| Modifier and Type | Method and Description |
|---|---|
static Timestamper |
create(TimestampingMode mode)
Returns the timestamper for the specified mode.
|
protected Collection<X509CertificateHolder> |
getExtraCertificates(CMSSignedData token)
Return the certificate chain of the timestamping authority if it isn't included
with the counter signature in the unsigned attributes.
|
protected abstract AttributeTable |
getUnsignedAttributes(CMSSignedData token)
Return the counter signature to be added as an unsigned attribute.
|
protected CMSSignedData |
modifySignedData(CMSSignedData sigData,
AttributeTable unsignedAttributes,
Collection<X509CertificateHolder> extraCertificates) |
void |
setRetries(int retries)
Set the number of retries.
|
void |
setRetryWait(int retryWait)
Set the number of seconds to wait between retries.
|
void |
setURL(String tsaurl) |
void |
setURLs(String... tsaurls) |
protected abstract CMSSignedData |
timestamp(DigestAlgorithm algo,
byte[] encryptedDigest) |
CMSSignedData |
timestamp(DigestAlgorithm algo,
CMSSignedData sigData)
Timestamp the specified signature.
|
protected int retries
protected int retryWait
public Timestamper()
public static Timestamper create(TimestampingMode mode)
protected Collection<X509CertificateHolder> getExtraCertificates(CMSSignedData token)
protected abstract AttributeTable getUnsignedAttributes(CMSSignedData token)
protected CMSSignedData modifySignedData(CMSSignedData sigData, AttributeTable unsignedAttributes, Collection<X509CertificateHolder> extraCertificates) throws IOException, CMSException
IOExceptionCMSExceptionpublic void setRetries(int retries)
public void setRetryWait(int retryWait)
protected abstract CMSSignedData timestamp(DigestAlgorithm algo, byte[] encryptedDigest) throws IOException, CMSException, TimestampingException
public CMSSignedData timestamp(DigestAlgorithm algo, CMSSignedData sigData) throws IOException, CMSException
algo - the digest algorithm used for the timestampsigData - the signed data to be timestampedIOExceptionCMSExceptionCopyright © 2012–2019. All rights reserved.