Class OCSPService

java.lang.Object
com.isode.dsapi.config.ManagedObject
com.isode.dsapi.config.OCSPService

public class OCSPService extends ManagedObject
This class wraps the OCSP configuration entry.
Since:
16.2
  • Constructor Details

  • Method Details

    • load

      public void load(Entry entry) throws ConfigOpFailedException
      Description copied from class: ManagedObject
      Load values from an entry. No directory operation should be done in this method.

      Mandatory variables are assigned only after everything is ok. This is done so during re-loading, if there are exceptions and even then the object is used, there is no crash by using mandatory variables that are assumed to have non-null values.

      Specified by:
      load in class ManagedObject
      Parameters:
      entry - Entry representing the object, could be null if the existing entry has to be reloaded
      Throws:
      ConfigOpFailedException - if mandatory attributes are not loaded
    • create

      public static OCSPService create(IsodeDirectorySession ds, DN entryDN, byte[] ber, String p12file, String pphrfile, String description) throws ConfigOpFailedException, ReadFailedException
      Create an OCSP service configuration object and add the corresponding entry.
      Parameters:
      ds - Isode directory session, must not be null.
      entryDN - Service DN, must not be null.
      ber - Issuer certificate BER bytes, must not be null.
      p12file - P12 private key path, must not be null.
      pphrfile - P12 private key passphrase file path, must not be null.
      description - Description, may be null.
      Returns:
      The created OCSPService object.
      Throws:
      ReadFailedException - if there is a problem on reading the committed entry back.
      ConfigOpFailedException - if there is any other problem in create the OCSP service configuration object or entry.
    • getServiceName

      public String getServiceName()
      Returns:
      The service name, or null if no value.
    • getP12File

      public String getP12File()
      Returns:
      The P12 file name, or null if no value.
    • setP12File

      public void setP12File(String path) throws BadValueException
      Set the P12 file name.
      Parameters:
      path - New path name (relative to the DSA directory). A value of null indicates that the attribute should be removed.
      Throws:
      BadValueException - if path is not a valid LDAP string representation for P12 filename
    • getPPHRFile

      public String getPPHRFile()
      Returns:
      The P12 passphrase file name, or null if no value.
    • setPPHRFile

      public void setPPHRFile(String path) throws BadValueException
      Set the P12 passphrase file name.
      Parameters:
      path - New path name (relative to the DSA directory). A value of null indicates that the attribute should be removed.
      Throws:
      BadValueException - if path is not a valid LDAP string representation for P12 passphrase filename
    • getCADN

      public DN getCADN()
      Returns:
      The CA DN, or null if no value.
    • getIssuerCertificate

      public byte[] getIssuerCertificate()
      Returns:
      The issuer certificate (as bytes), or null if no value.
    • setIssuerCertificate

      public void setIssuerCertificate(byte[] ber) throws BadValueException
      Set the issuer certificate (as bytes).
      Parameters:
      ber - Issuer certificate as bytes. The bytes are encoded to a certificate to verify the contents. A value of null indicates that the attribute should be removed.
      Throws:
      BadValueException - if the value specified is invalid for the certificate attribute type
    • getNextUpdate

      public Integer getNextUpdate()
      Get the next update to be specified in the OCSP response
      Returns:
      next update, can be null
      Since:
      16.3
    • setNextUpdate

      public void setNextUpdate(Integer nextUpdate)
      Set the next update field of an OCSP response
      Parameters:
      nextUpdate - next update, can be null
      Since:
      16.3
    • toString

      public String toString()
      Overrides:
      toString in class Object