Class OCSPClient


  • public final class OCSPClient
    extends java.lang.Object

    Class that represents an OCSP client. It is implementing the RFC 2560 also taking care to support the lightweight profile recommendations defined in the RFC 5019.

    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 OCSPEnhancedResponse validateCertificate​(java.security.cert.X509Certificate certificateToValidate)
      Method that validates a certificate against an OCSP responder.
      static OCSPEnhancedResponse validateCertificate​(java.security.cert.X509Certificate certificateToValidate, java.lang.String idClient)
      Method that validates a certificate against an OCSP responder.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • validateCertificate

        public static OCSPEnhancedResponse validateCertificate​(java.security.cert.X509Certificate certificateToValidate,
                                                               java.lang.String idClient)
                                                        throws OCSPClientException
        Method that validates a certificate against an OCSP responder.
        Parameters:
        certificateToValidate - Parameter that represents the certificate to validate.
        idClient - Parameter that represents the client application identifier.
        Returns:
        an object that contains the response of the OCSP responder and the date when the cached response expires on the OCSP responder.
        Throws:
        OCSPClientException - If the method fails.
      • validateCertificate

        public static OCSPEnhancedResponse validateCertificate​(java.security.cert.X509Certificate certificateToValidate)
                                                        throws OCSPClientException
        Method that validates a certificate against an OCSP responder.
        Parameters:
        certificateToValidate - Parameter that represents the certificate to validate.
        Returns:
        an object that contains the response of the OCSP responder and the date when the cached response expires on the OCSP responder.
        Throws:
        OCSPClientException - If the method fails.