public class SSLTestConfig
extends org.apache.solr.client.solrj.embedded.SSLConfig
| Modifier and Type | Field and Description |
|---|---|
static File |
TEST_KEYSTORE |
| Constructor and Description |
|---|
SSLTestConfig() |
SSLTestConfig(boolean useSSL,
boolean clientAuth) |
SSLTestConfig(boolean useSSL,
boolean clientAuth,
String keyStore,
String keyStorePassword,
String trustStore,
String trustStorePassword) |
| Modifier and Type | Method and Description |
|---|---|
protected static KeyStore |
buildKeyStore(String keyStoreLocation,
String password)
Constructs a KeyStore using the specified filename and password
|
SSLContext |
buildServerSSLContext()
Builds a new SSLContext for jetty servers which have been configured based on the settings of
this object.
|
protected SSLContext |
buildSSLContext()
Builds a new SSLContext for HTTP clients to use when communicating with servers which have
been configured based on the settings of this object.
|
static void |
clearSSLSystemProperties() |
org.eclipse.jetty.util.ssl.SslContextFactory |
createContextFactory()
Returns an SslContextFactory using
buildServerSSLContext() if SSL should be used, else returns null. |
org.apache.solr.client.solrj.impl.HttpClientConfigurer |
getHttpClientConfigurer()
Will provide an HttpClientConfigurer for SSL support (adds https and
removes http schemes) is SSL is enabled, otherwise return the default
configurer
|
static void |
setSSLSystemProperties() |
public static File TEST_KEYSTORE
public SSLTestConfig()
public SSLTestConfig(boolean useSSL,
boolean clientAuth)
public org.apache.solr.client.solrj.impl.HttpClientConfigurer getHttpClientConfigurer()
protected SSLContext buildSSLContext() throws KeyManagementException, UnrecoverableKeyException, NoSuchAlgorithmException, KeyStoreException
SecureRandom instance to prevent tests from blocking
due to lack of entropy, also explicitly allows the use of self-signed
certificates (since that's what is almost always used during testing).public SSLContext buildServerSSLContext() throws KeyManagementException, UnrecoverableKeyException, NoSuchAlgorithmException, KeyStoreException
SecureRandom instance to prevent tests from blocking
due to lack of entropy, also explicitly allows the use of self-signed
certificates (since that's what is almost always used during testing).
almost always used during testing).public org.eclipse.jetty.util.ssl.SslContextFactory createContextFactory()
buildServerSSLContext() if SSL should be used, else returns null.createContextFactory in class org.apache.solr.client.solrj.embedded.SSLConfigprotected static KeyStore buildKeyStore(String keyStoreLocation, String password)
public static void setSSLSystemProperties()
public static void clearSSLSystemProperties()
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.