Package es.gob.afirma.tsl.access
Class TSLManager
- java.lang.Object
-
- es.gob.afirma.tsl.access.TSLManager
-
public final class TSLManager extends java.lang.ObjectClass that reprensents the TSL Manager for all the differents operations.
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 Instance Methods Concrete Methods Modifier and Type Method Description ITSLObjectbuildTsl(java.io.ByteArrayInputStream bais)Method to obtain the TSL mapped from a file.static TSLManagergetInstance()Gets the unique instance of this class.java.util.Set<java.lang.String>getSetOfURLStringThatRepresentsEuLOTL()Gets the set of URL (String format) that represents the official european list of trusted lists.java.lang.StringgetSetOfURLStringThatRepresentsEuLOTLinString()Gets the set of URL (String format) that represents the official european list of trusted lists splitted by commas.ITSLValidatorResultvalidateX509withTSL(java.security.cert.X509Certificate cert, java.util.Date validationDate, boolean checkStatusRevocation, boolean calculateMappings, TSLObject tslObject)Tries to validate the input X509v3 certificate with.
-
-
-
Method Detail
-
getInstance
public static TSLManager getInstance()
Gets the unique instance of this class.- Returns:
- The unique instance of the
TSLManagerclass.
-
buildTsl
public ITSLObject buildTsl(java.io.ByteArrayInputStream bais) throws TSLManagingException
Method to obtain the TSL mapped from a file.- Parameters:
bais- InputStream Input Stream of the XML (TSL representation).- Returns:
- a TSL Data Object representation.
- Throws:
TSLManagingException- In case of some error getting the information from the file.
-
getSetOfURLStringThatRepresentsEuLOTL
public java.util.Set<java.lang.String> getSetOfURLStringThatRepresentsEuLOTL()
Gets the set of URL (String format) that represents the official european list of trusted lists.- Returns:
- set of URL (String format) that represents the official european list of trusted lists.
-
getSetOfURLStringThatRepresentsEuLOTLinString
public java.lang.String getSetOfURLStringThatRepresentsEuLOTLinString()
Gets the set of URL (String format) that represents the official european list of trusted lists splitted by commas.- Returns:
- set of URL (String format) that represents the official european list of trusted lists splitted by commas.
-
validateX509withTSL
public ITSLValidatorResult validateX509withTSL(java.security.cert.X509Certificate cert, java.util.Date validationDate, boolean checkStatusRevocation, boolean calculateMappings, TSLObject tslObject) throws TSLManagingException
Tries to validate the input X509v3 certificate with.- Parameters:
cert- X509v3 certificate to validate.validationDate- Validation date to check.checkStatusRevocation- Flag that indicates if only try to detect the input certificate (false) or also checks the revocation status of this (true).calculateMappings- Flag that indicates if it is necessary to calculate the mappings associated if the certificate has been detected (true) or not (false).tslObject- TSL object representation to use.- Returns:
- TSL validation result, with all the collected information.
- Throws:
TSLManagingException- If there is some error with the cache or validating the certificate with the TSL.
-
-