public final class UtilsTimestampPdfBc
extends java.lang.Object
Class that contains methods related to the manage of timestamps.
Project:Library for the integration with the services of @Firma, eVisor and TS@.
| Modifier and Type | Field and Description |
|---|---|
static Logger |
LOGGER
Attribute that represents the object that manages the log of the class.
|
| Modifier and Type | Method and Description |
|---|---|
static org.bouncycastle.tsp.TimeStampToken |
getFirstTimeStampToken(org.bouncycastle.asn1.ASN1EncodableVector unsignedAttributes)
Method that obtains the first time-stamp contained inside of a list of unsigned attributes.
|
static java.util.List<org.bouncycastle.tsp.TimeStampToken> |
getOrderedTimeStampTokens(org.bouncycastle.asn1.ASN1EncodableVector unsignedAttributes)
Method that obtains a list with the timestamps contained inside of a set of unsigned attributes.
|
static java.security.cert.X509Certificate |
getSigningCertificate(org.bouncycastle.tsp.TimeStampToken tst)
Method that obtain the the signing certificate of a timestamp.
|
static org.bouncycastle.tsp.TimeStampToken |
getTimeStampToken(org.bouncycastle.asn1.cms.Attribute signatureTimeStampAttribute,
java.security.cert.X509Certificate signingCertificate)
Method that obtains the time-stamp contained inside of a
signature-time-stamp attribute. |
static org.bouncycastle.tsp.TimeStampToken |
getTimeStampToken(org.bouncycastle.cms.SignerInformation signerInformation)
Method that obtains the timestamp from the information about a signer of a signature, if it contains a timestamp.
|
static void |
validateASN1Timestamp(org.bouncycastle.tsp.TimeStampToken tst)
Method that validates an ASN.1 timestamp.
|
static void |
validateTimestampMessageImprint(org.bouncycastle.tsp.TimeStampToken tst,
byte[] stampedData)
Method that checks if the value of the messageImprint field within time-stamp token is a hash of the value indicated.
|
public static final Logger LOGGER
public static java.security.cert.X509Certificate getSigningCertificate(org.bouncycastle.tsp.TimeStampToken tst)
throws SigningException
tst - Parameter that represents the timestamp.SigningException - If the method fails.public static void validateASN1Timestamp(org.bouncycastle.tsp.TimeStampToken tst)
throws SigningException
tst - Parameter that represents the ASN.1 timestamp to validate.SigningException - If the method fails or the timestamp isn't valid.public static org.bouncycastle.tsp.TimeStampToken getTimeStampToken(org.bouncycastle.cms.SignerInformation signerInformation)
throws SigningException
signerInformation - Parameter that represents the information of the signer.null.SigningException - If the timestamp is malformed.public static org.bouncycastle.tsp.TimeStampToken getFirstTimeStampToken(org.bouncycastle.asn1.ASN1EncodableVector unsignedAttributes)
throws SigningException
unsignedAttributes - Parameter that represents the list of unsigned attribute of an ASN.1 signature.SigningException - If one of the attributes contains a badly formed time-stamp.public static org.bouncycastle.tsp.TimeStampToken getTimeStampToken(org.bouncycastle.asn1.cms.Attribute signatureTimeStampAttribute,
java.security.cert.X509Certificate signingCertificate)
throws SigningException
signature-time-stamp attribute.signatureTimeStampAttribute - Parameter that represents the signature-time-stamp attribute.signingCertificate - Parameter that represents the signing certificate.SigningException - If the time-stamp is badly encoded.public static void validateTimestampMessageImprint(org.bouncycastle.tsp.TimeStampToken tst,
byte[] stampedData)
throws SigningException
tst - Parameter that represents the timestamp.stampedData - Parameter that represents the data stamped to compare with it.SigningException - If the validation fails.public static java.util.List<org.bouncycastle.tsp.TimeStampToken> getOrderedTimeStampTokens(org.bouncycastle.asn1.ASN1EncodableVector unsignedAttributes)
throws SigningException
unsignedAttributes - Parameter that represents the set of unsigned attributes.SigningException - If the method fails.