Tabnine Logo
SslConfig.setTrustManagers
Code IndexAdd Tabnine 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)

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

  • Making http post requests using okhttp
  • getExternalFilesDir (Context)
  • onRequestPermissionsResult (Fragment)
  • runOnUiThread (Activity)
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • IsNull (org.hamcrest.core)
    Is the value null?
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now