Package org.apache.qpid.protonj2.client
Class SslOptions
java.lang.Object
org.apache.qpid.protonj2.client.SslOptions
- All Implemented Interfaces:
Cloneable
Options for configuration of the client SSL layer
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
allowNativeSSL
(boolean allowNativeSSL) clone()
contextProtocol
(String contextProtocol) The protocol value to use when creating an SSLContext via SSLContext.getInstance(protocol).protected SslOptions
copyInto
(SslOptions other) Copy all configuration into the givenSslOptions
from this instance.int
defaultSslPort
(int defaultSslPort) Sets the default AMQP SSL port that should be used if the user did not provide a port value.String[]
disabledCipherSuites
(String... disabledCipherSuites) String[]
disabledProtocols
(String... disabledProtocols) The protocols to be disable.String[]
enabledCipherSuites
(String... enabledCipherSuites) String[]
enabledProtocols
(String... enabledProtocols) The protocols to be set as enabled.keyAlias()
keyStoreLocation
(String keyStoreLocation) Sets the location on disk of the key store to use.keyStorePassword
(String keyStorePassword) keyStoreType
(String keyStoreType) sslContextOverride
(SSLContext sslContextOverride) Provides a user configuredSSLContext
that should be used when performing the SSL handshake with the remote.boolean
sslEnabled
(boolean enable) Enable or disable the transport level SSL encryption layer.boolean
trustAll()
trustAll
(boolean trustAll) trustStoreLocation
(String trustStoreLocation) trustStorePassword
(String trustStorePassword) trustStoreType
(String trustStoreType) boolean
verifyHost
(boolean verifyHost)
-
Field Details
-
DEFAULT_STORE_TYPE
- See Also:
-
DEFAULT_CONTEXT_PROTOCOL
- See Also:
-
DEFAULT_TRUST_ALL
public static final boolean DEFAULT_TRUST_ALL- See Also:
-
DEFAULT_VERIFY_HOST
public static final boolean DEFAULT_VERIFY_HOST- See Also:
-
DEFAULT_DISABLED_PROTOCOLS
-
DEFAULT_SSL_PORT
public static final int DEFAULT_SSL_PORT- See Also:
-
DEFAULT_ALLOW_NATIVE_SSL
public static final boolean DEFAULT_ALLOW_NATIVE_SSL- See Also:
-
-
Constructor Details
-
SslOptions
public SslOptions()
-
-
Method Details
-
clone
-
sslEnabled
public boolean sslEnabled()- Returns:
- true if the client transport will attempt to connect with SSL
-
sslEnabled
Enable or disable the transport level SSL encryption layer.- Parameters:
enable
- boolean that controls if SSL is enabled or disabled.- Returns:
- this
SslOptions
instance.
-
keyStoreLocation
- Returns:
- the keyStoreLocation currently configured.
-
keyStoreLocation
Sets the location on disk of the key store to use.- Parameters:
keyStoreLocation
- the keyStoreLocation to use to create the key manager.- Returns:
- this options instance.
-
keyStorePassword
- Returns:
- the keyStorePassword
-
keyStorePassword
- Parameters:
keyStorePassword
- the keyStorePassword to set- Returns:
- this options instance.
-
trustStoreLocation
- Returns:
- the trustStoreLocation
-
trustStoreLocation
- Parameters:
trustStoreLocation
- the trustStoreLocation to set- Returns:
- this options instance.
-
trustStorePassword
- Returns:
- the trustStorePassword
-
trustStorePassword
- Parameters:
trustStorePassword
- the trustStorePassword to set- Returns:
- this options instance.
-
storeType
- Parameters:
storeType
- the format that the store files are encoded in.- Returns:
- this options instance.
-
keyStoreType
- Returns:
- the keyStoreType
-
keyStoreType
- Parameters:
keyStoreType
- the format that the keyStore file is encoded in- Returns:
- this options instance.
-
trustStoreType
- Returns:
- the trustStoreType
-
trustStoreType
- Parameters:
trustStoreType
- the format that the trustStore file is encoded in- Returns:
- this options instance.
-
enabledCipherSuites
- Returns:
- the enabledCipherSuites
-
enabledCipherSuites
- Parameters:
enabledCipherSuites
- the enabledCipherSuites to set- Returns:
- this options instance.
-
disabledCipherSuites
- Returns:
- the disabledCipherSuites
-
disabledCipherSuites
- Parameters:
disabledCipherSuites
- the disabledCipherSuites to set- Returns:
- this options instance.
-
enabledProtocols
- Returns:
- the enabledProtocols or null if the defaults should be used
-
enabledProtocols
The protocols to be set as enabled.- Parameters:
enabledProtocols
- the enabled protocols to set, or null if the defaults should be used.- Returns:
- this options instance.
-
disabledProtocols
- Returns:
- the protocols to disable or null if none should be
-
disabledProtocols
The protocols to be disable.- Parameters:
disabledProtocols
- the protocols to disable, or null if none should be.- Returns:
- this options instance.
-
contextProtocol
- Returns:
- the context protocol to use
-
contextProtocol
The protocol value to use when creating an SSLContext via SSLContext.getInstance(protocol).- Parameters:
contextProtocol
- the context protocol to use.- Returns:
- this options instance.
-
trustAll
public boolean trustAll()- Returns:
- the trustAll
-
trustAll
- Parameters:
trustAll
- the trustAll to set- Returns:
- this options instance.
-
verifyHost
public boolean verifyHost()- Returns:
- the verifyHost
-
verifyHost
- Parameters:
verifyHost
- the verifyHost to set- Returns:
- this options instance.
-
keyAlias
- Returns:
- the key alias
-
keyAlias
- Parameters:
keyAlias
- the key alias to use- Returns:
- this options instance.
-
defaultSslPort
public int defaultSslPort()- Returns:
- the currently configured default SSL port.
-
defaultSslPort
Sets the default AMQP SSL port that should be used if the user did not provide a port value.- Parameters:
defaultSslPort
- the default AMQP SSL port to use when none provided by the user.- Returns:
- this
SslOptions
instance.
-
sslContextOverride
- Returns:
- the currently configured
SSLContext
override or null if none set.
-
sslContextOverride
Provides a user configuredSSLContext
that should be used when performing the SSL handshake with the remote.- Parameters:
sslContextOverride
- User definedSSLContext
used for authentication.- Returns:
- this
SslOptions
instance.
-
allowNativeSSL
public boolean allowNativeSSL()- Returns:
- true if the an native SSL based encryption layer is allowed to be used instead of the JDK.
-
allowNativeSSL
- Parameters:
allowNativeSSL
- Configure if the transport should attempt to use native SSL support if available.- Returns:
- this options object.
-
copyInto
Copy all configuration into the givenSslOptions
from this instance.- Parameters:
other
- anotherSslOptions
instance that will receive the configuration from this instance.- Returns:
- the options instance that was copied into.
-