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
  • onRequestPermissionsResult (Fragment)
  • getSharedPreferences (Context)
  • onCreateOptionsMenu (Activity)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • 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