Codota Logo
SslConfig.setTrustManagers
Code IndexAdd Codota to your IDE (free)

How to use
setTrustManagers
method
in
org.ldaptive.ssl.SslConfig

Best Java code snippets using org.ldaptive.ssl.SslConfig.setTrustManagers (Showing top 6 results out of 315)

  • Common ways to obtain SslConfig
private void myMethod () {
SslConfig s =
  • Codota IconConnectionConfig connectionConfig;connectionConfig.getSslConfig()
  • Smart code suggestions by Codota
}
origin: vt-middleware/ldaptive

/**
 * Adds a {@link HostnameVerifyingTrustManager} to the supplied config if no trust managers have been configured. A
 * {@link DefaultTrustManager} is also added in no {@link CredentialConfig} has been configured.
 *
 * @deprecated  {@link HostnameVerifierConfig} should be used for hostname verification
 *
 * @param  config  to modify
 * @param  names  of the hosts to verify
 */
@Deprecated
protected static void addHostnameVerifyingTrustManager(final SslConfig config, final String[] names)
{
 if (config.getTrustManagers() == null) {
  if (config.getCredentialConfig() == null) {
   config.setTrustManagers(
    new DefaultTrustManager(),
    new HostnameVerifyingTrustManager(new DefaultHostnameVerifier(), names));
  } else {
   config.setTrustManagers(new HostnameVerifyingTrustManager(new DefaultHostnameVerifier(), names));
  }
 }
}
origin: org.ldaptive/ldaptive

/**
 * Adds a {@link HostnameVerifyingTrustManager} to the supplied config if no trust managers have been configured. A
 * {@link DefaultTrustManager} is also added in no {@link CredentialConfig} has been configured.
 *
 * @deprecated  {@link HostnameVerifierConfig} should be used for hostname verification
 *
 * @param  config  to modify
 * @param  names  of the hosts to verify
 */
@Deprecated
protected static void addHostnameVerifyingTrustManager(final SslConfig config, final String[] names)
{
 if (config.getTrustManagers() == null) {
  if (config.getCredentialConfig() == null) {
   config.setTrustManagers(
    new DefaultTrustManager(),
    new HostnameVerifyingTrustManager(new DefaultHostnameVerifier(), names));
  } else {
   config.setTrustManagers(new HostnameVerifyingTrustManager(new DefaultHostnameVerifier(), names));
  }
 }
}
origin: com.floragunn/ldaptive

/**
 * Adds a {@link HostnameVerifyingTrustManager} to the supplied config if no trust managers have been configured. A
 * {@link DefaultTrustManager} is also added in no {@link CredentialConfig} has been configured.
 *
 * @param  config  to modify
 * @param  names  of the hosts to verify
 */
protected static void addHostnameVerifyingTrustManager(final SslConfig config, final String[] names)
{
 if (config.getTrustManagers() == null) {
  if (config.getCredentialConfig() == null) {
   config.setTrustManagers(
    new DefaultTrustManager(),
    new HostnameVerifyingTrustManager(new DefaultHostnameVerifier(), names));
  } else {
   config.setTrustManagers(new HostnameVerifyingTrustManager(new DefaultHostnameVerifier(), names));
  }
 }
}
origin: com.floragunn/ldaptive

/**
 * Returns a ssl config initialized with the supplied config.
 *
 * @param  config  ssl config to read properties from
 *
 * @return  ssl config
 */
public static SslConfig newSslConfig(final SslConfig config)
{
 final SslConfig sc = new SslConfig();
 sc.setCredentialConfig(config.getCredentialConfig());
 sc.setTrustManagers(config.getTrustManagers());
 sc.setEnabledCipherSuites(config.getEnabledCipherSuites());
 sc.setEnabledProtocols(config.getEnabledProtocols());
 sc.setHandshakeCompletedListeners(config.getHandshakeCompletedListeners());
 return sc;
}
origin: org.ldaptive/ldaptive

/**
 * Returns a ssl config initialized with the supplied config.
 *
 * @param  config  ssl config to read properties from
 *
 * @return  ssl config
 */
public static SslConfig newSslConfig(final SslConfig config)
{
 final SslConfig sc = new SslConfig();
 sc.setCredentialConfig(config.getCredentialConfig());
 sc.setTrustManagers(config.getTrustManagers());
 sc.setHostnameVerifier(config.getHostnameVerifier());
 sc.setHostnameVerifierConfig(config.getHostnameVerifierConfig());
 sc.setEnabledCipherSuites(config.getEnabledCipherSuites());
 sc.setEnabledProtocols(config.getEnabledProtocols());
 sc.setHandshakeCompletedListeners(config.getHandshakeCompletedListeners());
 return sc;
}
origin: vt-middleware/ldaptive

/**
 * Returns a ssl config initialized with the supplied config.
 *
 * @param  config  ssl config to read properties from
 *
 * @return  ssl config
 */
public static SslConfig newSslConfig(final SslConfig config)
{
 final SslConfig sc = new SslConfig();
 sc.setCredentialConfig(config.getCredentialConfig());
 sc.setTrustManagers(config.getTrustManagers());
 sc.setHostnameVerifier(config.getHostnameVerifier());
 sc.setHostnameVerifierConfig(config.getHostnameVerifierConfig());
 sc.setEnabledCipherSuites(config.getEnabledCipherSuites());
 sc.setEnabledProtocols(config.getEnabledProtocols());
 sc.setHandshakeCompletedListeners(config.getHandshakeCompletedListeners());
 return sc;
}
org.ldaptive.sslSslConfigsetTrustManagers

Javadoc

Sets the trust managers.

Popular methods of SslConfig

  • <init>
    Creates a new ssl config.
  • getCredentialConfig
    Returns the credential config.
  • getEnabledCipherSuites
    Returns the names of the SSL cipher suites to use for secure connections.
  • getEnabledProtocols
    Returns the names of the SSL protocols to use for secure connections.
  • getTrustManagers
    Returns the trust managers.
  • isEmpty
    Returns whether this ssl config contains any configuration data.
  • checkImmutable
  • getHandshakeCompletedListeners
    Returns the handshake completed listeners to use for secure connections.
  • getHostnameVerifier
    Returns the hostname verifier.
  • newSslConfig
    Returns a ssl config initialized with the supplied config.
  • setCredentialConfig
    Sets the credential config.
  • setEnabledCipherSuites
    Sets the SSL cipher suites to use for secure connections.
  • setCredentialConfig,
  • setEnabledCipherSuites,
  • setEnabledProtocols,
  • setHandshakeCompletedListeners,
  • getHostnameVerifierConfig,
  • setHostnameVerifier,
  • setHostnameVerifierConfig

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (ScheduledExecutorService)
  • onCreateOptionsMenu (Activity)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Set (java.util)
    A collection that contains no duplicate elements. More formally, sets contain no pair of elements e1
  • Pattern (java.util.regex)
    A compiled representation of a regular expression. A regular expression, specified as a string, must
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now