Class CertificateStoreManager

  • All Implemented Interfaces:
    Module

    public class CertificateStoreManager
    extends BasicModule
    A manager of certificate stores.
    • Constructor Detail

      • CertificateStoreManager

        public CertificateStoreManager()
      • CertificateStoreManager

        public CertificateStoreManager​(boolean disableWatcher)
    • Method Detail

      • initialize

        public void initialize​(XMPPServer server)
        Description copied from class: BasicModule

        Initializes the basic module.

        Inheriting classes that choose to override this method MUST call this initialize() method before accessing BasicModule resources.

        Specified by:
        initialize in interface Module
        Overrides:
        initialize in class BasicModule
        Parameters:
        server - the server hosting this module.
      • destroy

        public void destroy()
        Description copied from class: BasicModule

        Destroys the module.

        Does nothing in the basic module.

        Specified by:
        destroy in interface Module
        Overrides:
        destroy in class BasicModule
      • backup

        public Collection<Path> backup()
                                throws IOException
        Creates a backup of all files that back any of the certificate stores. Each certificate store can be configured to use a distinct file, as well as use a distinct backup location. In practise, there will be a lot of overlap. This implementation creates a backup (by copying the file) for each unique file/backup-location combination in the collection of all certificate stores.
        Returns:
        the paths the store was backed up to
        Throws:
        IOException - if the store could not be backed up
      • getIdentityStoreBackupDirectory

        public static String getIdentityStoreBackupDirectory​(ConnectionType type)
        The location (relative to OPENFIRE_HOME) of the directory that holds backups for identity stores.
        Parameters:
        type - the connection type
        Returns:
        a path (never null).
      • getTrustStoreBackupDirectory

        public static String getTrustStoreBackupDirectory​(ConnectionType type)
        The location (relative to OPENFIRE_HOME) of the directory that holds backups for trust stores.
        Parameters:
        type - the connection type
        Returns:
        a path (never null).
      • usesDistinctConfigurationForEachType

        public boolean usesDistinctConfigurationForEachType()
                                                     throws IOException
        Checks if Openfire is configured to use the same set of three keystore files for all connection types (one identity store, and two trust stores - one for client-based connections, and one for server/component-based connections). This method will return 'false' when running Openfire without changes to its default keystore configuration. If changes are made to use different keystores for at least one connection type, this method returns 'true'.
        Returns:
        true if Openfire is using different keystores based on the type of connection, false when running with the default store configuration.
        Throws:
        IOException - if there was an IO error