Package es.gob.afirma.tsl
Interface ITslValidation
-
- All Known Implementing Classes:
TslValidation
public interface ITslValidationInterface that publishes the necessary methods to perform certificate validation through a TSL.
Project:Library for the integration with the services of @Firma, eVisor and TS@.
- Version:
- 1.2, 26/09/2022.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPARAM_CERTIFICATEConstant attribute that represents the token parameter 'certificate'.static java.lang.StringPARAM_TSLOBJECTConstant attribute that represents the token parameter 'tslObject'.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ITSLObjectdownloadTLSbyHTTP(java.lang.String uriTSL, int connectionTimeout, int readTimeout)Method that downloads a TSL from a specified URIITSLObjectgetTSLObjectFromPath(java.lang.String pathTsl)Method to obtain the TSL mapped from a file.DetectCertInTslInfoAndValidationResponsevalidateCertificateTsl(byte[] certByteArrayB64, TSLObject tslObject, java.util.Date date, boolean getInfo, boolean checkRevStatus)Method that validates a certificate with a given TSL.
-
-
-
Field Detail
-
PARAM_CERTIFICATE
static final java.lang.String PARAM_CERTIFICATE
Constant attribute that represents the token parameter 'certificate'.- See Also:
- Constant Field Values
-
PARAM_TSLOBJECT
static final java.lang.String PARAM_TSLOBJECT
Constant attribute that represents the token parameter 'tslObject'.- See Also:
- Constant Field Values
-
-
Method Detail
-
validateCertificateTsl
DetectCertInTslInfoAndValidationResponse validateCertificateTsl(byte[] certByteArrayB64, TSLObject tslObject, java.util.Date date, boolean getInfo, boolean checkRevStatus) throws TSLManagingException
Method that validates a certificate with a given TSL.- Parameters:
certByteArrayB64- Certificate to detect (byte[] in Base64 encoded).tslObject- TSL object representation to use.date- Date to use to detect and validate the input certificate.getInfo- Flag that indicates if it is necessary to get the certificate information in response.checkRevStatus- Flag that indicates if it is necessary to check the revocation status of the input certificate.- Returns:
- Structure with detected certificate in TSL and revocation status.
- Throws:
TSLManagingException- If some error is produced in the execution of the service.
-
getTSLObjectFromPath
ITSLObject getTSLObjectFromPath(java.lang.String pathTsl) throws TSLManagingException
Method to obtain the TSL mapped from a file.- Parameters:
pathTsl- Path where the file with the TSL is located.- Returns:
- a TSL Data Object representation.
- Throws:
TSLManagingException- In case of some error getting the information from the file.
-
downloadTLSbyHTTP
ITSLObject downloadTLSbyHTTP(java.lang.String uriTSL, int connectionTimeout, int readTimeout) throws TSLManagingException
Method that downloads a TSL from a specified URI- Parameters:
uriTSL- RL from where the TSL will be downloaded.connectionTimeout- Max millis to connect to server.readTimeout- Max millis to read the response.- Returns:
- a TSL Data Object representation.
- Throws:
TSLManagingException- In case of some error getting the information from the file.
-
-