Class OCSPServiceManager

java.lang.Object
com.isode.dsapi.config.OCSPServiceManager

public class OCSPServiceManager extends Object
OCSPServiceManager handles the OCSP service configuration entries.
Since:
16.2
Author:
dsm
  • Field Details

    • logger

      protected static final com.isode.util.Logger logger
  • Constructor Details

    • OCSPServiceManager

      public OCSPServiceManager(IsodeDirectorySession ds)
      Constructor for peer DSA manager.
      Parameters:
      ds - Isode directory session, must not be null
  • Method Details

    • load

      public void load(Entry entry) throws ConfigOpFailedException
      Load an OCSP service entry.
      Parameters:
      entry - Entry, must not be null
      Throws:
      ConfigOpFailedException - if mandatory attributes are not loaded
    • create

      public OCSPService create(String name, byte[] ber, String p12file, String pphrfile, String description) throws ConfigOpFailedException, ReadFailedException
      Create a peer configuration entry.
      Parameters:
      name - Service name, must not be null.
      ber - CA certificate BER bytes.
      p12file - P12 private key path, can be null
      pphrfile - P12 private key passphrase file path, can only be null if the p12 file is null. It should be a non null value when a p12 file is specified
      description - Description, may be null.
      Returns:
      The created OCSPService object.
      Throws:
      ConfigOpFailedException - if there is any other problem in create the OCSP service configuration object or entry.
      ReadFailedException - if there is a problem on reading the committed entry back.
    • delete

      public void delete(DN dn) throws ConfigOpFailedException
      Remove an OCSP service by service name.
      Parameters:
      dn - DN of configuration entry.
      Throws:
      ConfigOpFailedException - if the operation failed.
    • get

      public HashMap<DN,OCSPService> get()
      Get the peer DSAs.
      Returns:
      list of peer DSAs, will not be null.
    • getByServiceName

      public OCSPService getByServiceName(String name)
      Find an OCSP service by service name.
      Parameters:
      name - service name, not null
      Returns:
      Matching OCSP service or null.
    • getByCADN

      public OCSPService getByCADN(DN dn)
      Find an OCSP service by CA DN.
      Parameters:
      dn - the DN of the CA that this service represents, not null
      Returns:
      Matching OCSP service or null.