use of org.apache.directory.ldap.client.api.NoVerificationTrustManager in project jackrabbit-oak by apache.
the class LdapIdentityProvider method createConnectionConfig.
/**
* Creates a new connection config based on the config.
* @return the connection config.
*/
@Nonnull
private LdapConnectionConfig createConnectionConfig() {
LdapConnectionConfig cc = new LdapConnectionConfig();
cc.setLdapHost(config.getHostname());
cc.setLdapPort(config.getPort());
cc.setUseSsl(config.useSSL());
cc.setUseTls(config.useTLS());
// todo: implement better trustmanager/keystore management (via sling/felix)
if (config.noCertCheck()) {
cc.setTrustManagers(new NoVerificationTrustManager());
}
if (enabledSSLProtocols != null) {
cc.setEnabledProtocols(enabledSSLProtocols);
}
return cc;
}
Aggregations