Package es.gob.afirma.utils
Class UtilsTimestampOcspRfc3161
- java.lang.Object
-
- es.gob.afirma.utils.UtilsTimestampOcspRfc3161
-
public final class UtilsTimestampOcspRfc3161 extends java.lang.ObjectClass that contains methods related to the manage of timestamps.
Project:Library for the integration with the services of @Firma, eVisor and TS@.
- Version:
- 1.1, 18/04/2022.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.bouncycastle.tsp.TimeStampTokengetTimestampFromRFC3161Service(byte[] dataToStamp, java.lang.String applicationID, java.lang.String tsaCommunicationMode)Method that obtains an ASN.1 timestamp from TS@ RFC 3161 service.static org.bouncycastle.tsp.TimeStampTokengetTimestampFromRFC3161Service(byte[] dataToStamp, java.lang.String applicationID, java.lang.String tsaCommunicationMode, java.lang.String idClient)Method that obtains an ASN.1 timestamp from TS@ RFC 3161 service.
-
-
-
Field Detail
-
LOGGER
public static final Logger LOGGER
Attribute that represents the object that manages the log of the class.
-
-
Method Detail
-
getTimestampFromRFC3161Service
public static org.bouncycastle.tsp.TimeStampToken getTimestampFromRFC3161Service(byte[] dataToStamp, java.lang.String applicationID, java.lang.String tsaCommunicationMode, java.lang.String idClient) throws SigningExceptionMethod that obtains an ASN.1 timestamp from TS@ RFC 3161 service.- Parameters:
dataToStamp- Parameter that represents the data to stamp.applicationID- Parameter that represents the identifier of the client application.tsaCommunicationMode- Parameter that represents the protocol defined to communicate with TS@. The allowed values are:IUtilsTimestamp.TSA_RFC3161_TCP_COMMUNICATIONfor TCP communication.IUtilsTimestamp.TSA_RFC3161_HTTPS_COMMUNICATIONfor HTTPS communication.IUtilsTimestamp.TSA_RFC3161_SSL_COMMUNICATIONfor SSL communication.
idClient- Parameter that represents the client application identifier.- Returns:
- an object that represents the ASN.1 timestamp.
- Throws:
SigningException- If the method fails.
-
getTimestampFromRFC3161Service
public static org.bouncycastle.tsp.TimeStampToken getTimestampFromRFC3161Service(byte[] dataToStamp, java.lang.String applicationID, java.lang.String tsaCommunicationMode) throws SigningExceptionMethod that obtains an ASN.1 timestamp from TS@ RFC 3161 service.- Parameters:
dataToStamp- Parameter that represents the data to stamp.applicationID- Parameter that represents the identifier of the client application.tsaCommunicationMode- Parameter that represents the protocol defined to communicate with TS@. The allowed values are:IUtilsTimestamp.TSA_RFC3161_TCP_COMMUNICATIONfor TCP communication.IUtilsTimestamp.TSA_RFC3161_HTTPS_COMMUNICATIONfor HTTPS communication.IUtilsTimestamp.TSA_RFC3161_SSL_COMMUNICATIONfor SSL communication.
- Returns:
- an object that represents the ASN.1 timestamp.
- Throws:
SigningException- If the method fails.
-
-