Top Description Fields Constructors Methods
org.bouncycastle.tsp.ers

public Class ERSArchiveTimeStamp

extends Object
Class Inheritance
Imports
java.io.IOException, java.util.Collection, .Date, org.bouncycastle.asn1.tsp.ArchiveTimeStamp, .PartialHashtree, org.bouncycastle.asn1.x509.AlgorithmIdentifier, org.bouncycastle.cert.X509CertificateHolder, org.bouncycastle.cms.SignerInformationVerifier, org.bouncycastle.operator.DigestCalculator, .DigestCalculatorProvider, .OperatorCreationException, org.bouncycastle.tsp.TSPException, .TimeStampToken, org.bouncycastle.util.Arrays, .Store

RFC 4998 ArchiveTimeStamp.

Field Summary

Modifier and TypeField and Description
private final ArchiveTimeStamp
private final DigestCalculator
private final byte[]
private ERSRootNodeCalculator
private final TimeStampToken

Constructor Summary

AccessConstructor and Description
public
ERSArchiveTimeStamp(byte[] archiveTimeStamp, DigestCalculatorProvider digCalcProv)

public
pack-priv
pack-priv
ERSArchiveTimeStamp(byte[] previousChainsDigest, ArchiveTimeStamp archiveTimeStamp, DigestCalculatorProvider digCalcProv)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
checkContainsHashValue(boolean isGroup, final byte[] hash, final DigestCalculator digCalc)

pack-priv void
checkTimeStampValid(final TimeStampToken timeStampToken, final byte[] hash)

public static ERSArchiveTimeStamp

Returns:

an ERSArchiveTimeStamp containing the time stamp.
fromTimeStampToken
(TimeStampToken
the TimeStampToken in the regular time stamp.
tspToken
,
DigestCalculatorProvider
a digest calculator provider for use with the time stamp.
digCalcProv
)

Build an ArchiveTimeStamp from a regular time stamp token.

public AlgorithmIdentifier
public byte[]
getEncoded()

return the ASN.1 encoded representation of this object.

public Date

Returns:

the issuing TSP server not-after date, or null if not present.
getExpiryTime
()

Return the not-after date for the time-stamp's signing certificate if it is present.

public Date

Returns:

the time the associated time-stamp was created.
getGenTime
()

Return the generation time of the time-stamp associated with this archive time stamp.

public X509CertificateHolder

Returns:

the TimeStamp signing certificate.
getSigningCertificate
()

Return the TimeStamp signing certificate if it is present.

public TimeStampToken
public boolean
isContaining(ERSData data, Date atDate)

public ArchiveTimeStamp
public void
validate(SignerInformationVerifier
signer verifier for the contained time stamp.
verifier
)

Validate the time stamp associated with this ArchiveTimeStamp.

public void
public void
validatePresent(boolean isDataGroup, byte[] hash, Date atDate)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

archiveTimeStampback to summary
private final ArchiveTimeStamp archiveTimeStamp
digCalcback to summary
private final DigestCalculator digCalc
previousChainsDigestback to summary
private final byte[] previousChainsDigest
rootNodeCalculatorback to summary
private ERSRootNodeCalculator rootNodeCalculator
timeStampTokenback to summary
private final TimeStampToken timeStampToken

Constructor Detail

ERSArchiveTimeStampback to summary
public ERSArchiveTimeStamp(byte[] archiveTimeStamp, DigestCalculatorProvider digCalcProv) throws TSPException, ERSException
ERSArchiveTimeStampback to summary
public ERSArchiveTimeStamp(ArchiveTimeStamp archiveTimeStamp, DigestCalculatorProvider digCalcProv) throws TSPException, ERSException
ERSArchiveTimeStampback to summary
pack-priv ERSArchiveTimeStamp(ArchiveTimeStamp archiveTimeStamp, DigestCalculator digCalc) throws TSPException, ERSException
ERSArchiveTimeStampback to summary
pack-priv ERSArchiveTimeStamp(byte[] previousChainsDigest, ArchiveTimeStamp archiveTimeStamp, DigestCalculatorProvider digCalcProv) throws TSPException, ERSException

Method Detail

checkContainsHashValueback to summary
pack-priv void checkContainsHashValue(boolean isGroup, final byte[] hash, final DigestCalculator digCalc) throws ArchiveTimeStampValidationException
checkTimeStampValidback to summary
pack-priv void checkTimeStampValid(final TimeStampToken timeStampToken, final byte[] hash) throws ArchiveTimeStampValidationException
fromTimeStampTokenback to summary
public static ERSArchiveTimeStamp fromTimeStampToken(TimeStampToken tspToken, DigestCalculatorProvider digCalcProv) throws TSPException, ERSException

Build an ArchiveTimeStamp from a regular time stamp token.

Parameters
tspToken:TimeStampToken

the TimeStampToken in the regular time stamp.

digCalcProv:DigestCalculatorProvider

a digest calculator provider for use with the time stamp.

Returns:ERSArchiveTimeStamp

an ERSArchiveTimeStamp containing the time stamp.

Exceptions
TSPException:
on a failure to parse the time stamp token data.
ERSException:
on a failure to convert the time stamp token to an archive time stamp.
getDigestAlgorithmIdentifierback to summary
public AlgorithmIdentifier getDigestAlgorithmIdentifier()
getEncodedback to summary
public byte[] getEncoded() throws IOException

return the ASN.1 encoded representation of this object.

getExpiryTimeback to summary
public Date getExpiryTime()

Return the not-after date for the time-stamp's signing certificate if it is present.

Returns:Date

the issuing TSP server not-after date, or null if not present.

getGenTimeback to summary
public Date getGenTime()

Return the generation time of the time-stamp associated with this archive time stamp.

Returns:Date

the time the associated time-stamp was created.

getSigningCertificateback to summary
public X509CertificateHolder getSigningCertificate()

Return the TimeStamp signing certificate if it is present.

Returns:X509CertificateHolder

the TimeStamp signing certificate.

getTimeStampTokenback to summary
public TimeStampToken getTimeStampToken()
isContainingback to summary
public boolean isContaining(ERSData data, Date atDate) throws ERSException
toASN1Structureback to summary
public ArchiveTimeStamp toASN1Structure()
validateback to summary
public void validate(SignerInformationVerifier verifier) throws TSPException

Validate the time stamp associated with this ArchiveTimeStamp.

Parameters
verifier:SignerInformationVerifier

signer verifier for the contained time stamp.

Exceptions
TSPException:
in case of validation failure or error.
validatePresentback to summary
public void validatePresent(ERSData data, Date atDate) throws ERSException
validatePresentback to summary
public void validatePresent(boolean isDataGroup, byte[] hash, Date atDate) throws ERSException