public class TimeStampToken
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
private class |
TimeStampToken.CertID |
| Modifier and Type | Field and Description |
|---|---|
(package private) TimeStampToken.CertID |
certID |
(package private) java.util.Date |
genTime |
(package private) SignerInformation |
tsaSignerInfo |
(package private) TimeStampTokenInfo |
tstInfo |
(package private) CMSSignedData |
tsToken |
| Constructor and Description |
|---|
TimeStampToken(CMSSignedData signedData) |
TimeStampToken(ContentInfo contentInfo) |
| Modifier and Type | Method and Description |
|---|---|
java.security.cert.CertStore |
getCertificatesAndCRLs(java.lang.String type,
java.lang.String provider) |
byte[] |
getEncoded()
Return a ASN.1 encoded byte stream representing the encoded object.
|
SignerId |
getSID() |
AttributeTable |
getSignedAttributes() |
TimeStampTokenInfo |
getTimeStampInfo() |
AttributeTable |
getUnsignedAttributes() |
CMSSignedData |
toCMSSignedData()
Return the underlying CMSSignedData object.
|
void |
validate(java.security.cert.X509Certificate cert,
java.lang.String provider)
Validate the time stamp token.
|
CMSSignedData tsToken
SignerInformation tsaSignerInfo
java.util.Date genTime
TimeStampTokenInfo tstInfo
TimeStampToken.CertID certID
public TimeStampToken(ContentInfo contentInfo) throws TSPException, java.io.IOException
TSPExceptionjava.io.IOExceptionpublic TimeStampToken(CMSSignedData signedData) throws TSPException, java.io.IOException
TSPExceptionjava.io.IOExceptionpublic TimeStampTokenInfo getTimeStampInfo()
public SignerId getSID()
public AttributeTable getSignedAttributes()
public AttributeTable getUnsignedAttributes()
public java.security.cert.CertStore getCertificatesAndCRLs(java.lang.String type,
java.lang.String provider)
throws java.security.NoSuchAlgorithmException,
java.security.NoSuchProviderException,
CMSException
java.security.NoSuchAlgorithmExceptionjava.security.NoSuchProviderExceptionCMSExceptionpublic void validate(java.security.cert.X509Certificate cert,
java.lang.String provider)
throws TSPException,
TSPValidationException,
java.security.cert.CertificateExpiredException,
java.security.cert.CertificateNotYetValidException,
java.security.NoSuchProviderException
To be valid the token must be signed by the passed in certificate and the certificate must be the one referred to by the SigningCertificate attribute included in the hashed attributes of the token. The certificate must also have the ExtendedKeyUsageExtension with only KeyPurposeId.id_kp_timeStamping and have been valid at the time the timestamp was created.
A successful call to validate means all the above are true.
TSPExceptionTSPValidationExceptionjava.security.cert.CertificateExpiredExceptionjava.security.cert.CertificateNotYetValidExceptionjava.security.NoSuchProviderExceptionpublic CMSSignedData toCMSSignedData()
public byte[] getEncoded()
throws java.io.IOException
java.io.IOException - if encoding fails.Copyright © 1998-2014 Gamma Technologies. All Rights Reserved.