public final class TimeStamp extends Object
An instance of this class can be obtained using request methods from the TimeStampGenerator class.
| Constructor and Description |
|---|
TimeStamp(byte[] encoded)
Creates a TimeStamp object from the given encoded TimeStampToken value.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getCanonicalizationMethod()
Applies only for XAdES timestamps.
|
byte[] |
getEncoded()
Returns an ASN.1 encoded TimeStampToken value.
|
Date |
getGenTime()
Returns time when this TimeStamp was created.
|
String |
getMessageImprintAlgOID() |
byte[] |
getMessageImprintDigest()
Returns a message digest contained by this TimeStamp.
|
BigInteger |
getSerialNumber()
Returns the serial number of this TimeStamp.
|
X509Certificate |
getSigningCertificate()
Returns TSA certificate used to sign this TimeStamp.
|
void |
setCanonicalizationMethod(String canonicalizationMethod) |
void |
validateSignature(PublicKey publicKey)
Validates TimeStamp signature using the given PublicKey.
|
X509Certificate |
validateSigningCertificate()
Deprecated.
method is obsolete as of the version 2.2.0, no replacement.
|
X509Certificate |
validateSigningCertificate(boolean checkCRLs)
Deprecated.
method is obsolete as of the version 2.2.0, no replacement.
|
public TimeStamp(byte[] encoded)
throws TSPException
encoded - an array of bytes containing an ASN.1 encoded TimeStampToken value.TSPException - if the TimeStamp cannot be created.public byte[] getEncoded()
throws TSPException
TSPException - if the encoded value cannot be extracted.public byte[] getMessageImprintDigest()
public X509Certificate getSigningCertificate() throws TSPException
TSPException - if the certificate cannot be extracted.public Date getGenTime()
public BigInteger getSerialNumber()
Time-Stamping users MUST be ready to accommodate integers up to 160 bits, as defined in IETF RFC 3161 Time-Stamp Protocol (TSP).
public String getMessageImprintAlgOID()
@Deprecated public X509Certificate validateSigningCertificate() throws TSPException
TSA certificate is validated performing the following checks:
TrustStore.generateCertPath(X509Certificate);CRLManager.getCRLs(X509Certificate).TSPException - if one of the TSA certificate checks fail or cannot be performed.@Deprecated public X509Certificate validateSigningCertificate(boolean checkCRLs) throws TSPException
checkCRLs - true if to perform the CRL revocation check.TSPException - if one of the TSA certificate checks fail or cannot be performed.validateSigningCertificate()public void validateSignature(PublicKey publicKey) throws TSPException
publicKey - the PublicKey to use for signature validation.TSPException - if TimeStamp signature cannot be verified.public String getCanonicalizationMethod()
String representing the canonicalization method used by the timestamp, or null if unspecified.public void setCanonicalizationMethod(String canonicalizationMethod)