Package org.opends.server.extensions
Class PKCS11TrustManagerProvider
- java.lang.Object
-
- org.opends.server.api.TrustManagerProvider<PKCS11TrustManagerProviderCfg>
-
- org.opends.server.extensions.PKCS11TrustManagerProvider
-
- All Implemented Interfaces:
ConfigurationChangeListener<PKCS11TrustManagerProviderCfg>
public class PKCS11TrustManagerProvider extends TrustManagerProvider<PKCS11TrustManagerProviderCfg> implements ConfigurationChangeListener<PKCS11TrustManagerProviderCfg>
This class defines a trust manager provider that will reference certificates stored in a file located on the Directory Server filesystem.
-
-
Constructor Summary
Constructors Constructor Description PKCS11TrustManagerProvider()Creates a new instance of this file-based trust manager provider.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConfigChangeResultapplyConfigurationChange(PKCS11TrustManagerProviderCfg cfg)Applies the configuration changes to this change listener.voidfinalizeTrustManagerProvider()Performs any finalization that may be necessary for this trust manager provider.TrustManager[]getTrustManagers()Retrieves a set ofTrustManagerobjects that may be used for interactions requiring access to a trust manager.voidinitializeTrustManagerProvider(PKCS11TrustManagerProviderCfg cfg)Initializes this trust manager provider based on the information in the provided configuration entry.booleanisConfigurationAcceptable(TrustManagerProviderCfg cfg, List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons)Indicates whether the provided configuration is acceptable for this trust manager provider.booleanisConfigurationChangeAcceptable(PKCS11TrustManagerProviderCfg cfg, List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons)Indicates whether the proposed change to the configuration is acceptable to this change listener.
-
-
-
Method Detail
-
initializeTrustManagerProvider
public void initializeTrustManagerProvider(PKCS11TrustManagerProviderCfg cfg) throws ConfigException, InitializationException
Description copied from class:TrustManagerProviderInitializes this trust manager provider based on the information in the provided configuration entry.- Specified by:
initializeTrustManagerProviderin classTrustManagerProvider<PKCS11TrustManagerProviderCfg>- Parameters:
cfg- The configuration to use for this trust manager provider.- Throws:
ConfigException- If an unrecoverable problem arises in the process of performing the initialization as a result of the server configuration.InitializationException- If a problem occurs during initialization that is not related to the server configuration.
-
finalizeTrustManagerProvider
public void finalizeTrustManagerProvider()
Description copied from class:TrustManagerProviderPerforms any finalization that may be necessary for this trust manager provider.- Specified by:
finalizeTrustManagerProviderin classTrustManagerProvider<PKCS11TrustManagerProviderCfg>
-
getTrustManagers
public TrustManager[] getTrustManagers() throws DirectoryException
Description copied from class:TrustManagerProviderRetrieves a set ofTrustManagerobjects that may be used for interactions requiring access to a trust manager.- Specified by:
getTrustManagersin classTrustManagerProvider<PKCS11TrustManagerProviderCfg>- Returns:
- A set of
TrustManagerobjects that may be used for interactions requiring access to a trust manager. - Throws:
DirectoryException- If a problem occurs while attempting to obtain the set of trust managers.
-
isConfigurationAcceptable
public boolean isConfigurationAcceptable(TrustManagerProviderCfg cfg, List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons)
Description copied from class:TrustManagerProviderIndicates whether the provided configuration is acceptable for this trust manager provider. It should be possible to call this method on an uninitialized trust manager provider instance in order to determine whether the trust manager provider would be able to use the provided configuration.
Note that implementations which use a subclass of the provided configuration class will likely need to cast the configuration to the appropriate subclass type.- Overrides:
isConfigurationAcceptablein classTrustManagerProvider<PKCS11TrustManagerProviderCfg>- Parameters:
cfg- The trust manager provider configuration for which to make the determination.unacceptableReasons- A list that may be used to hold the reasons that the provided configuration is not acceptable.- Returns:
trueif the provided configuration is acceptable for this trust manager provider, orfalseif not.
-
isConfigurationChangeAcceptable
public boolean isConfigurationChangeAcceptable(PKCS11TrustManagerProviderCfg cfg, List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons)
Description copied from interface:ConfigurationChangeListenerIndicates whether the proposed change to the configuration is acceptable to this change listener.- Specified by:
isConfigurationChangeAcceptablein interfaceConfigurationChangeListener<PKCS11TrustManagerProviderCfg>- Parameters:
cfg- The new configuration containing the changes.unacceptableReasons- A list that can be used to hold messages about why the provided configuration is not acceptable.- Returns:
- Returns
trueif the proposed change is acceptable, orfalseif it is not.
-
applyConfigurationChange
public ConfigChangeResult applyConfigurationChange(PKCS11TrustManagerProviderCfg cfg)
Description copied from interface:ConfigurationChangeListenerApplies the configuration changes to this change listener.- Specified by:
applyConfigurationChangein interfaceConfigurationChangeListener<PKCS11TrustManagerProviderCfg>- Parameters:
cfg- The new configuration containing the changes.- Returns:
- Returns information about the result of changing the configuration.
-
-