{
provider.finalizeTrustManagerProvider();
}
}
return new ConfigChangeResult(resultCode, adminActionRequired, messages);
}
// Get the class for the trust manager provider. If the provider is already
// enabled, then we shouldn't do anything with it although if the class has
// changed then we'll at least need to indicate that administrative action
// is required. If the provider is disabled, then instantiate the class and
// initialize and register it as a trust manager provider.
String className = configuration.getJavaClass();
if (existingProvider != null)
{
if (! className.equals(existingProvider.getClass().getName()))
{
adminActionRequired = true;
}
return new ConfigChangeResult(resultCode, adminActionRequired, messages);
}
TrustManagerProvider provider = null;
try
{
provider = loadProvider(className, configuration, true);
}
catch (InitializationException ie)
{
if (resultCode == ResultCode.SUCCESS)
{
resultCode = DirectoryServer.getServerErrorResultCode();
}
messages.add(ie.getMessageObject());
}
if (resultCode == ResultCode.SUCCESS)
{
providers.put(configuration.dn(), provider);
DirectoryServer.registerTrustManagerProvider(configuration.dn(),
provider);
}
return new ConfigChangeResult(resultCode, adminActionRequired, messages);
}