org.bouncycastle.tsp
public class TimeStampToken extends Object
Constructor Summary | |
---|---|
TimeStampToken(CMSSignedData signedData) |
Method Summary | |
---|---|
CertStore | getCertificatesAndCRLs(String type, String provider) |
byte[] | getEncoded()
Return a ASN.1 encoded byte stream representing the encoded object.
|
AttributeTable | getSignedAttributes() |
SignerId | getSID() |
TimeStampTokenInfo | getTimeStampInfo() |
AttributeTable | getUnsignedAttributes() |
CMSSignedData | toCMSSignedData()
Return the underlying CMSSignedData object.
|
void | validate(X509Certificate cert, String provider)
Validate the time stamp token.
|
Throws: IOException if encoding fails.
Returns: the underlying CMS structure.
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.