Class BindProfileUtils

java.lang.Object
com.isode.dsapi.profile.BindProfileUtils

public class BindProfileUtils extends Object
General utility class for bind profile
Since:
16.3
  • Constructor Details

    • BindProfileUtils

      public BindProfileUtils()
  • Method Details

    • cleanUpIdentities

      public static int cleanUpIdentities(boolean clean)
      Determine the number of identity files that are no longer referenced by any of the bind profiles and remove them if required.

      This will find any P12 files from the Identities directory which are not referenced by any bind profile.

      Parameters:
      clean - true to remove the identities not referenced and false to just return the number of such identities
      Returns:
      number of unreferenced identities
      Since:
      14.6
    • cleanUpTrustAnchors

      public static Map<String,SSLCertificate> cleanUpTrustAnchors(boolean clean)
      Determine list of trusted certificate files that are no longer referenced by any of the bind profiles and remove them if required.

      This will find any trusted certificates files from the Trust Store directory which are not referenced by any bind profile.

      Parameters:
      clean - true to remove the trusted certificates not referenced and false to just return the list of such certificates
      Returns:
      unreferenced trusted certificates
      Since:
      16.3
    • checkAndRemoveCertFromTrustStore

      public static void checkAndRemoveCertFromTrustStore(String key) throws IOException
      Remove certificate corresponding to given key from the trust store if it is not used any where in the bind profile.
      Parameters:
      key - key referring to certificate to be removed, not null
      Throws:
      IOException - if there was an error while removing the certificate from the trust store.
      Since:
      16.3
    • copySettings

      public static void copySettings(BindProfile oldBP, BindProfile newBP)
      Copies the settings (that is, at the time of writing, the single value, mutli value and AttributeBlock in the bind profile) from one BindProfile to another.
      Parameters:
      oldBP - The BindProfile to copy the values from, should not be null.
      newBP - The BindProfile to copy the values to, should not be null.
      Since:
      17.0