| | |
| | | import javax.net.ssl.KeyManagerFactory; |
| | | |
| | | import org.opends.server.admin.server.ConfigurationChangeListener; |
| | | import org.opends.server.admin.std.server.PKCS11KeyManagerCfg; |
| | | import org.opends.server.admin.std.server.PKCS11KeyManagerProviderCfg; |
| | | import org.opends.server.api.KeyManagerProvider; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryServer; |
| | |
| | | * configured on the underlying system. |
| | | */ |
| | | public class PKCS11KeyManagerProvider |
| | | extends KeyManagerProvider<PKCS11KeyManagerCfg> |
| | | implements ConfigurationChangeListener<PKCS11KeyManagerCfg> |
| | | extends KeyManagerProvider<PKCS11KeyManagerProviderCfg> |
| | | implements ConfigurationChangeListener<PKCS11KeyManagerProviderCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | |
| | | private char[] keyStorePIN; |
| | | |
| | | // The current configuration for this key manager provider. |
| | | private PKCS11KeyManagerCfg currentConfig; |
| | | private PKCS11KeyManagerProviderCfg currentConfig; |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public void initializeKeyManagerProvider(PKCS11KeyManagerCfg configuration) |
| | | public void initializeKeyManagerProvider( |
| | | PKCS11KeyManagerProviderCfg configuration) |
| | | throws ConfigException, InitializationException |
| | | { |
| | | // Store the DN of the configuration entry and register to be notified of |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public boolean isConfigurationAcceptable(PKCS11KeyManagerCfg configuration, |
| | | List<Message> unacceptableReasons) |
| | | public boolean isConfigurationAcceptable( |
| | | PKCS11KeyManagerProviderCfg configuration, |
| | | List<Message> unacceptableReasons) |
| | | { |
| | | return isConfigurationChangeAcceptable(configuration, unacceptableReasons); |
| | | } |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean isConfigurationChangeAcceptable( |
| | | PKCS11KeyManagerCfg configuration, |
| | | PKCS11KeyManagerProviderCfg configuration, |
| | | List<Message> unacceptableReasons) |
| | | { |
| | | boolean configAcceptable = true; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public ConfigChangeResult applyConfigurationChange( |
| | | PKCS11KeyManagerCfg configuration) |
| | | PKCS11KeyManagerProviderCfg configuration) |
| | | { |
| | | ResultCode resultCode = ResultCode.SUCCESS; |
| | | boolean adminActionRequired = false; |