Bouncy Castle Cryptography Library 1.79

org.bouncycastle.tsp.ers
Class ERSEvidenceRecord

java.lang.Object
  |
  +--org.bouncycastle.tsp.ers.ERSEvidenceRecord

public class ERSEvidenceRecord
extends java.lang.Object

RFC 4998 Evidence Record.


Constructor Summary
ERSEvidenceRecord(byte[] evidenceRecord, DigestCalculatorProvider digestCalculatorProvider)
           
ERSEvidenceRecord(org.bouncycastle.asn1.tsp.EvidenceRecord evidenceRecord, DigestCalculatorProvider digestCalculatorProvider)
           
ERSEvidenceRecord(java.io.InputStream ersIn, DigestCalculatorProvider digestCalculatorProvider)
           
 
Method Summary
 TimeStampRequest generateHashRenewalRequest(DigestCalculator digCalc, ERSData data, TimeStampRequestGenerator tspReqGen)
           
 TimeStampRequest generateHashRenewalRequest(DigestCalculator digCalc, ERSData data, TimeStampRequestGenerator tspReqGen, java.math.BigInteger nonce)
           
 TimeStampRequest generateTimeStampRenewalRequest(TimeStampRequestGenerator tspReqGen)
           
 TimeStampRequest generateTimeStampRenewalRequest(TimeStampRequestGenerator tspReqGen, java.math.BigInteger nonce)
           
 byte[] getEncoded()
          return the ASN.1 encoded representation of this object.
 byte[] getPrimaryRootHash()
          Return the timestamp imprint for the initial ArchiveTimeStamp in this evidence record.
 X509CertificateHolder getSigningCertificate()
          Return the TimeStamp signing certificate if it is present.
 boolean isContaining(ERSData data, java.util.Date date)
          Return true if the hash of data appears in the primary archive time stamp for the current chain.
 boolean isRelatedTo(ERSEvidenceRecord er)
          Return true if this evidence record is related to the passed in one.
 ERSEvidenceRecord renewHash(DigestCalculator digCalc, ERSData data, TimeStampResponse tspResp)
           
 ERSEvidenceRecord renewTimeStamp(TimeStampResponse tspResp)
           
 org.bouncycastle.asn1.tsp.EvidenceRecord toASN1Structure()
           
 void validate(SignerInformationVerifier verifier)
          Validate the current time stamp associated with this evidence record.
 void validatePresent(boolean isDataGroup, byte[] hash, java.util.Date atDate)
          Validate that a particular data object/group is present by hash.
 void validatePresent(ERSData data, java.util.Date atDate)
          Validate that a particular data object/group is present.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ERSEvidenceRecord

public ERSEvidenceRecord(java.io.InputStream ersIn,
                         DigestCalculatorProvider digestCalculatorProvider)
                  throws TSPException,
                         ERSException,
                         java.io.IOException

ERSEvidenceRecord

public ERSEvidenceRecord(byte[] evidenceRecord,
                         DigestCalculatorProvider digestCalculatorProvider)
                  throws TSPException,
                         ERSException

ERSEvidenceRecord

public ERSEvidenceRecord(org.bouncycastle.asn1.tsp.EvidenceRecord evidenceRecord,
                         DigestCalculatorProvider digestCalculatorProvider)
                  throws TSPException,
                         ERSException
Method Detail

getPrimaryRootHash

public byte[] getPrimaryRootHash()
                          throws TSPException,
                                 ERSException
Return the timestamp imprint for the initial ArchiveTimeStamp in this evidence record.
Returns:
initial hash root.

isRelatedTo

public boolean isRelatedTo(ERSEvidenceRecord er)
Return true if this evidence record is related to the passed in one.
Parameters:
er - the evidence record to be checked.
Returns:
true if the primary time stamp has the same value, false otherwise.

isContaining

public boolean isContaining(ERSData data,
                            java.util.Date date)
                     throws ERSException
Return true if the hash of data appears in the primary archive time stamp for the current chain.
Parameters:
data - the data of interest.
Returns:
 

validatePresent

public void validatePresent(ERSData data,
                            java.util.Date atDate)
                     throws ERSException
Validate that a particular data object/group is present.
Parameters:
data - the data object/group.
atDate - date at which data is supposed to be valid.
Throws:
ERSException - if the object cannot be found or the record is invalid.

validatePresent

public void validatePresent(boolean isDataGroup,
                            byte[] hash,
                            java.util.Date atDate)
                     throws ERSException
Validate that a particular data object/group is present by hash.
Parameters:
isDataGroup - true if hash represents a data group.
hash - expected hash value
atDate - date at which value is supposed to be valid.
Throws:
ERSException - if the object cannot be found or the record is invalid.

getSigningCertificate

public X509CertificateHolder getSigningCertificate()
Return the TimeStamp signing certificate if it is present.
Returns:
the TimeStamp signing certificate.

validate

public void validate(SignerInformationVerifier verifier)
              throws TSPException
Validate the current time stamp associated with this evidence record.
Parameters:
verifier - signer verifier for the contained time stamp.
Throws:
TSPException - in case of validation failure or error.

toASN1Structure

public org.bouncycastle.asn1.tsp.EvidenceRecord toASN1Structure()

getEncoded

public byte[] getEncoded()
                  throws java.io.IOException
return the ASN.1 encoded representation of this object.

generateTimeStampRenewalRequest

public TimeStampRequest generateTimeStampRenewalRequest(TimeStampRequestGenerator tspReqGen)
                                                 throws TSPException,
                                                        ERSException

generateTimeStampRenewalRequest

public TimeStampRequest generateTimeStampRenewalRequest(TimeStampRequestGenerator tspReqGen,
                                                        java.math.BigInteger nonce)
                                                 throws ERSException,
                                                        TSPException

renewTimeStamp

public ERSEvidenceRecord renewTimeStamp(TimeStampResponse tspResp)
                                 throws ERSException,
                                        TSPException

generateHashRenewalRequest

public TimeStampRequest generateHashRenewalRequest(DigestCalculator digCalc,
                                                   ERSData data,
                                                   TimeStampRequestGenerator tspReqGen)
                                            throws ERSException,
                                                   TSPException,
                                                   java.io.IOException

generateHashRenewalRequest

public TimeStampRequest generateHashRenewalRequest(DigestCalculator digCalc,
                                                   ERSData data,
                                                   TimeStampRequestGenerator tspReqGen,
                                                   java.math.BigInteger nonce)
                                            throws ERSException,
                                                   TSPException,
                                                   java.io.IOException

renewHash

public ERSEvidenceRecord renewHash(DigestCalculator digCalc,
                                   ERSData data,
                                   TimeStampResponse tspResp)
                            throws ERSException,
                                   TSPException

Bouncy Castle Cryptography Library 1.79