Package es.gob.afirma.utils
Class UtilsSignatureCommons
- java.lang.Object
-
- es.gob.afirma.utils.UtilsSignatureCommons
-
- All Implemented Interfaces:
IUtilsSignature
public final class UtilsSignatureCommons extends java.lang.Object implements IUtilsSignature
Class that contains methods related to the manage of signatures.
Project:Library for the integration with the services of @Firma, eVisor and TS@.
- Version:
- 1.1, 18/04/2022.
-
-
Field Summary
-
Fields inherited from interface es.gob.afirma.utils.IUtilsSignature
DETACHED_SIGNATURE_MODE, ENVELOPED_SIGNATURE_MODE, ENVELOPING_SIGNATURE_MODE, EXPLICIT_SIGNATURE_MODE, IMPLICIT_SIGNATURE_MODE, VALIDATION_LEVEL_COMPLETE, VALIDATION_LEVEL_NONE, VALIDATION_LEVEL_SIMPLE
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcheckValityPeriod(java.security.cert.X509Certificate certificate, java.util.Date verificationDate)Method that checks if the verification date parameter is into the certificate validity period.static org.w3c.dom.DocumentgetDocumentFromXML(byte[] xmlDocument)Method that obtains an object as a representation of a XML document.
-
-
-
Method Detail
-
getDocumentFromXML
public static org.w3c.dom.Document getDocumentFromXML(byte[] xmlDocument) throws SigningExceptionMethod that obtains an object as a representation of a XML document.- Parameters:
xmlDocument- Parameter that represents the XML document.- Returns:
- an object as a representation of the XML document.
- Throws:
SigningException- If the XML document has a bad format.
-
checkValityPeriod
public static void checkValityPeriod(java.security.cert.X509Certificate certificate, java.util.Date verificationDate) throws SigningExceptionMethod that checks if the verification date parameter is into the certificate validity period.- Parameters:
certificate- Parameter that represents the certificate to validate.verificationDate- Parameter that represents the validation date.- Throws:
SigningException- If the certificate is expired or not yet valid.
-
-