Class 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.
    • Method Detail

      • getDocumentFromXML

        public static org.w3c.dom.Document getDocumentFromXML​(byte[] xmlDocument)
                                                       throws SigningException
        Method 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 SigningException
        Method 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.