Class SSLConfig
- java.lang.Object
-
- org.apache.solr.client.solrj.embedded.SSLConfig
-
public class SSLConfig extends Object
Encapsulates settings related to SSL Configuration. NOTE: all other settings are ignored ifisSSLMode()
is false.- See Also:
setUseSSL(boolean)
-
-
Constructor Summary
Constructors Constructor Description SSLConfig(boolean useSSL, boolean clientAuth, String keyStore, String keyStorePassword, String trustStore, String trustStorePassword)
NOTE: all other settings are ignored if useSSL is false; trustStore settings are ignored if clientAuth is false
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.jetty.util.ssl.SslContextFactory
createContextFactory()
Returns an SslContextFactory that should be used by a jetty server based on this SSLConfig instance, or null if SSL should not be used.static org.eclipse.jetty.util.ssl.SslContextFactory
createContextFactory(SSLConfig sslConfig)
Returns an SslContextFactory that should be used by a jetty server based on the specified SSLConfig param which may be null.String
getKeyStore()
String
getKeyStorePassword()
String
getTrustStore()
String
getTrustStorePassword()
boolean
isClientAuthMode()
boolean
isSSLMode()
All other settings on this object are ignored unless this is truevoid
setClientAuth(boolean clientAuth)
void
setUseSSL(boolean useSSL)
-
-
-
Method Detail
-
setUseSSL
public void setUseSSL(boolean useSSL)
-
setClientAuth
public void setClientAuth(boolean clientAuth)
-
isSSLMode
public boolean isSSLMode()
All other settings on this object are ignored unless this is true
-
isClientAuthMode
public boolean isClientAuthMode()
-
getKeyStore
public String getKeyStore()
-
getKeyStorePassword
public String getKeyStorePassword()
-
getTrustStore
public String getTrustStore()
-
getTrustStorePassword
public String getTrustStorePassword()
-
createContextFactory
public static org.eclipse.jetty.util.ssl.SslContextFactory createContextFactory(SSLConfig sslConfig)
Returns an SslContextFactory that should be used by a jetty server based on the specified SSLConfig param which may be null. if the SSLConfig param is non-null, then this method will return the results ofcreateContextFactory()
. If the SSLConfig param is null, then this method will return null unless thetests.jettySsl
system property is true, in which case standard "javax.net.ssl.*" system properties will be used instead, along with "tests.jettySsl.clientAuth".- See Also:
createContextFactory()
-
createContextFactory
public org.eclipse.jetty.util.ssl.SslContextFactory createContextFactory()
Returns an SslContextFactory that should be used by a jetty server based on this SSLConfig instance, or null if SSL should not be used. The default implementation generates a simple factory according to the keystore, truststore, and clientAuth properties of this object.
-
-