public final class UtilsTimestampXML
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 java.security.cert.X509Certificate |
getCertificateFromXMLTimestamp(org.w3c.dom.Element xmlTimestamp)
Method that obtains the signing certificate of a XML time-stamp.
|
static java.util.Date |
getGenTimeXMLTimestamp(org.w3c.dom.Element xmlTimestamp)
Method that obtains the gentime from a XML timestamp.
|
static byte[] |
getSignatureTimeStampDataToStamp(org.w3c.dom.Element dsSignature,
java.lang.String inputCanonicalizationAlgorithm)
Method that obtains the data to stamp with a time-stamp to include into a
xades:SignatureTimeStamp element. |
static java.security.cert.X509Certificate |
getSigningCertificate(org.bouncycastle.tsp.TimeStampToken tst)
Method that obtain the the signing certificate of a timestamp.
|
static void |
validateASN1Timestamp(org.bouncycastle.tsp.TimeStampToken tst)
Method that validates an ASN.1 timestamp.
|
static void |
validateTimeStampReferences(org.w3c.dom.Node xmlTST,
byte[] stampedData,
java.lang.String signatureTimeStampId)
Method that validates the references contained inside of a XML time-stamp.
|
static void |
validateXMLTimestamp(org.w3c.dom.Element tst)
Method that validates a XML timestamp.
|
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 validateXMLTimestamp(org.w3c.dom.Element tst)
throws SigningException
tst - Parameter that represents the XML timestamp.SigningException - If the validation 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 java.util.Date getGenTimeXMLTimestamp(org.w3c.dom.Element xmlTimestamp)
throws SigningException
xmlTimestamp - Parameter that represents the XML timestamp.SigningException - If the gentime cannot parse to UTC format.public static byte[] getSignatureTimeStampDataToStamp(org.w3c.dom.Element dsSignature,
java.lang.String inputCanonicalizationAlgorithm)
throws SigningException
xades:SignatureTimeStamp element.dsSignature - Parameter that represents the ds:Signature element of the XML signature.inputCanonicalizationAlgorithm - Parameter that represents the canonicalization algorithm to use for generating the time-stamp.SigningException - If the method fails.public static java.security.cert.X509Certificate getCertificateFromXMLTimestamp(org.w3c.dom.Element xmlTimestamp)
throws SigningException
xmlTimestamp - Parameter that represents the dss:Timestamp element.SigningException - If the certificate cannot be retrieved.public static void validateTimeStampReferences(org.w3c.dom.Node xmlTST,
byte[] stampedData,
java.lang.String signatureTimeStampId)
throws SigningException
xmlTST - Parameter that represents the node as the XML time-stamp.stampedData - Parameter that represents the data stamped to compare with it.signatureTimeStampId - Parameter that represents the value of Id attribute of the xades:SignatureTimeStamp element.SigningException - If the validation fails.