|
Bouncy Castle Cryptography Library 1.79 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.bouncycastle.tsp.TimeStampToken
Carrier class for a TimeStampToken.
Constructor Summary | |
TimeStampToken(CMSSignedData signedData)
|
|
TimeStampToken(org.bouncycastle.asn1.cms.ContentInfo contentInfo)
|
Method Summary | |
org.bouncycastle.util.Store |
getAttributeCertificates()
|
org.bouncycastle.util.Store |
getCertificates()
|
org.bouncycastle.util.Store |
getCRLs()
|
byte[] |
getEncoded()
Return a ASN.1 encoded byte stream representing the encoded object. |
byte[] |
getEncoded(java.lang.String encoding)
return the ASN.1 encoded representation of this object using the specified encoding. |
SignerId |
getSID()
|
org.bouncycastle.asn1.cms.AttributeTable |
getSignedAttributes()
|
TimeStampTokenInfo |
getTimeStampInfo()
|
org.bouncycastle.asn1.cms.AttributeTable |
getUnsignedAttributes()
|
boolean |
isSignatureValid(SignerInformationVerifier sigVerifier)
Return true if the signature on time stamp token is valid. |
CMSSignedData |
toCMSSignedData()
Return the underlying CMSSignedData object. |
void |
validate(SignerInformationVerifier sigVerifier)
Validate the time stamp token. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TimeStampToken(org.bouncycastle.asn1.cms.ContentInfo contentInfo) throws TSPException, java.io.IOException
public TimeStampToken(CMSSignedData signedData) throws TSPException, java.io.IOException
Method Detail |
public TimeStampTokenInfo getTimeStampInfo()
public SignerId getSID()
public org.bouncycastle.asn1.cms.AttributeTable getSignedAttributes()
public org.bouncycastle.asn1.cms.AttributeTable getUnsignedAttributes()
public org.bouncycastle.util.Store getCertificates()
public org.bouncycastle.util.Store getCRLs()
public org.bouncycastle.util.Store getAttributeCertificates()
public void validate(SignerInformationVerifier sigVerifier) throws TSPException, TSPValidationException
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.
sigVerifier
- the content verifier create the objects required to verify the CMS object in the timestamp.TSPException
- if an exception occurs in processing the token.TSPValidationException
- if the certificate or signature fail to be valid.java.lang.IllegalArgumentException
- if the sigVerifierProvider has no associated certificate.public boolean isSignatureValid(SignerInformationVerifier sigVerifier) throws TSPException
Note: this is a much weaker proof of correctness than calling validate().
sigVerifier
- the content verifier create the objects required to verify the CMS object in the timestamp.TSPException
- if the signature cannot be processed or the provider cannot match the algorithm.public CMSSignedData toCMSSignedData()
public byte[] getEncoded() throws java.io.IOException
java.io.IOException
- if encoding fails.public byte[] getEncoded(java.lang.String encoding) throws java.io.IOException
encoding
- the ASN.1 encoding format to use ("BER", "DL", or "DER").
|
Bouncy Castle Cryptography Library 1.79 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |