org.bouncycastle.tsp
Class TimeStampToken
java.lang.Object
org.bouncycastle.tsp.TimeStampToken
public class TimeStampToken
extends java.lang.Object
TimeStampToken
public TimeStampToken(CMSSignedData signedData)
throws TSPException,
IOException
getCertificatesAndCRLs
public CertStore getCertificatesAndCRLs(String type,
String provider)
throws NoSuchAlgorithmException,
NoSuchProviderException,
CMSException
getEncoded
public byte[] getEncoded()
throws IOException
Return a ASN.1 encoded byte stream representing the encoded object.
getSID
public SignerId getSID()
getSignedAttributes
public AttributeTable getSignedAttributes()
getUnsignedAttributes
public AttributeTable getUnsignedAttributes()
toCMSSignedData
public CMSSignedData toCMSSignedData()
Return the underlying CMSSignedData object.
- the underlying CMS structure.
validate
public void validate(X509Certificate cert,
String provider)
throws TSPException,
TSPValidationException,
CertificateExpiredException,
CertificateNotYetValidException,
NoSuchProviderException
Validate the time stamp token.
To be valid the token must be signed by the passed in certificate and
the certificate must be the one refered to by the SigningCertificate
attribute included in the hashed attributes of the token. The
certifcate 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.