Tabnine Logo
SslConfig.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.ldaptive.ssl.SslConfig
constructor

Best Java code snippets using org.ldaptive.ssl.SslConfig.<init> (Showing top 15 results out of 315)

origin: com.floragunn/ldaptive

/**
 * Returns an instance of this socket factory configured with a hostname verifying trust manager. If the supplied ssl
 * config does not contain trust managers, {@link HostnameVerifyingTrustManager} with {@link DefaultHostnameVerifier}
 * is set. See {@link #addHostnameVerifyingTrustManager(SslConfig, String[])}.
 *
 * @param  config  to set on the socket factory
 * @param  names  to use for hostname verification
 *
 * @return  socket factory
 */
public static SSLSocketFactory getHostnameVerifierFactory(final SslConfig config, final String[] names)
{
 final ThreadLocalTLSSocketFactory sf = new ThreadLocalTLSSocketFactory();
 if (config != null && !config.isEmpty()) {
  sf.setSslConfig(SslConfig.newSslConfig(config));
 } else {
  sf.setSslConfig(new SslConfig());
 }
 addHostnameVerifyingTrustManager(sf.getSslConfig(), names);
 try {
  sf.initialize();
 } catch (GeneralSecurityException e) {
  throw new IllegalArgumentException(e);
 }
 return sf;
}
origin: com.floragunn/ldaptive

/**
 * Returns an instance of this socket factory configured with a hostname verifying trust manager. If the supplied ssl
 * config does not contain trust managers, {@link HostnameVerifyingTrustManager} with {@link DefaultHostnameVerifier}
 * is set. See {@link #addHostnameVerifyingTrustManager(SslConfig, String[])}.
 *
 * @param  config  to set on the socket factory
 * @param  names  to use for hostname verification
 *
 * @return  socket factory
 */
@SuppressWarnings("RedundantArrayCreation")
public static SSLSocketFactory getHostnameVerifierFactory(final SslConfig config, final String[] names)
{
 final TLSSocketFactory sf = new TLSSocketFactory();
 if (config != null && !config.isEmpty()) {
  sf.setSslConfig(SslConfig.newSslConfig(config));
 } else {
  sf.setSslConfig(new SslConfig());
 }
 addHostnameVerifyingTrustManager(sf.getSslConfig(), names);
 try {
  sf.initialize();
 } catch (GeneralSecurityException e) {
  throw new IllegalArgumentException(e);
 }
 return sf;
}
origin: com.tomitribe.tribestream/tribestream-container

private void configureSSL(final Ldap ldap, final ConnectionConfig userConnectionConfig) {
  if (ldap.getX509() != null) {
    final X509CredentialConfig x509CredentialConfig = new X509CredentialConfig();
    x509CredentialConfig.setTrustCertificates(ldap.getX509()); // file:/path/to/trust.pem
    final SslConfig config = new SslConfig(x509CredentialConfig);
    userConnectionConfig.setSslConfig(config);
    userConnectionConfig.setUseSSL(ldap.isSsl());
  } else {
    userConnectionConfig.setUseSSL(ldap.isSsl());
  }
}
origin: vt-middleware/ldaptive

/**
 * Config test data.
 *
 * @return  test data
 */
@DataProvider(name = "configs")
public Object[][] createConfigs()
{
 return
  new Object[][] {
   new Object[] {new ConnectionConfig(), },
   new Object[] {new PoolConfig(), },
   new Object[] {new ProviderConfig(), },
   new Object[] {new SaslConfig(), },
   new Object[] {new SslConfig(), },
   new Object[] {new SocketConfig(), },
  };
}
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

 sf.setSslConfig(SslConfig.newSslConfig(config));
} else {
 sf.setSslConfig(new SslConfig());
origin: org.pac4j/pac4j-config

  final X509CredentialConfig cfg = new X509CredentialConfig();
  cfg.setTrustCertificates(l.getTrustCertificates());
  cc.setSslConfig(new SslConfig(cfg));
} else if (l.getKeystore() != null) {
  final KeyStoreCredentialConfig cfg = new KeyStoreCredentialConfig();
  cfg.setKeyStorePassword(l.getKeystorePassword());
  cfg.setKeyStoreType(l.getKeystoreType());
  cc.setSslConfig(new SslConfig(cfg));
} else {
  cc.setSslConfig(new SslConfig());
origin: vt-middleware/ldaptive

 sf.setSslConfig(SslConfig.newSslConfig(config));
} else {
 sf.setSslConfig(new SslConfig());
origin: vt-middleware/ldaptive

 sf.setSslConfig(SslConfig.newSslConfig(config));
} else {
 sf.setSslConfig(new SslConfig());
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;
}
origin: org.ldaptive/ldaptive

 sf.setSslConfig(SslConfig.newSslConfig(config));
} else {
 sf.setSslConfig(new SslConfig());
origin: org.ldaptive/ldaptive

sc = new SslConfig();
origin: com.floragunn/ldaptive

sc = new SslConfig();
origin: vt-middleware/ldaptive

sc = new SslConfig();
org.ldaptive.sslSslConfig<init>

Javadoc

Default constructor.

Popular methods of SslConfig

  • 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.
  • setEnabledProtocols
    Sets the SSL protocol versions to use for secure connections.
  • setEnabledCipherSuites,
  • setEnabledProtocols,
  • setHandshakeCompletedListeners,
  • setTrustManagers,
  • getHostnameVerifierConfig,
  • setHostnameVerifier,
  • setHostnameVerifierConfig

Popular in Java

  • Making http post requests using okhttp
  • getSystemService (Context)
  • getSupportFragmentManager (FragmentActivity)
  • requestLocationUpdates (LocationManager)
  • Path (java.nio.file)
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • JTextField (javax.swing)
  • Option (scala)
  • 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