Package io.vertx.core.net
Class ClientSSLOptions
- java.lang.Object
-
- io.vertx.core.net.SSLOptions
-
- io.vertx.core.net.ClientSSLOptions
-
public class ClientSSLOptions extends SSLOptions
Client SSL options.
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_HOSTNAME_VERIFICATION_ALGORITHM
Default value to determine hostname verification algorithm hostname verification (for SSL/TLS) = nullstatic boolean
DEFAULT_TRUST_ALL
The default value of whether all servers (SSL/TLS) should be trusted = false-
Fields inherited from class io.vertx.core.net.SSLOptions
DEFAULT_ENABLED_SECURE_TRANSPORT_PROTOCOLS, DEFAULT_SSL_HANDSHAKE_TIMEOUT, DEFAULT_SSL_HANDSHAKE_TIMEOUT_TIME_UNIT, DEFAULT_USE_ALPN
-
-
Constructor Summary
Constructors Constructor Description ClientSSLOptions()
Default constructorClientSSLOptions(JsonObject json)
Create options from JSONClientSSLOptions(ClientSSLOptions other)
Copy constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClientSSLOptions
copy()
String
getHostnameVerificationAlgorithm()
protected void
init()
boolean
isTrustAll()
ClientSSLOptions
setApplicationLayerProtocols(List<String> protocols)
Set the list of application-layer protocols to provide to the server during the Application-Layer Protocol Negotiation.ClientSSLOptions
setEnabledSecureTransportProtocols(Set<String> enabledSecureTransportProtocols)
Sets the list of enabled SSL/TLS protocols.ClientSSLOptions
setHostnameVerificationAlgorithm(String hostnameVerificationAlgorithm)
Set the hostname verification algorithm intervalClientSSLOptions
setKeyCertOptions(KeyCertOptions options)
Set the key/cert options.ClientSSLOptions
setSslHandshakeTimeout(long sslHandshakeTimeout)
Set the SSL handshake timeout, default time unit is seconds.ClientSSLOptions
setSslHandshakeTimeoutUnit(TimeUnit sslHandshakeTimeoutUnit)
Set the SSL handshake timeout unit.ClientSSLOptions
setTrustAll(boolean trustAll)
Set whether all server certificates should be trustedClientSSLOptions
setTrustOptions(TrustOptions options)
Set the trust options.ClientSSLOptions
setUseAlpn(boolean useAlpn)
Set the ALPN usage.JsonObject
toJson()
Convert to JSON-
Methods inherited from class io.vertx.core.net.SSLOptions
addCrlPath, addCrlValue, addEnabledCipherSuite, addEnabledSecureTransportProtocol, equals, getApplicationLayerProtocols, getCrlPaths, getCrlValues, getEnabledCipherSuites, getEnabledSecureTransportProtocols, getKeyCertOptions, getSslHandshakeTimeout, getSslHandshakeTimeoutUnit, getTrustOptions, hashCode, isUseAlpn, removeEnabledCipherSuite, removeEnabledSecureTransportProtocol
-
-
-
-
Field Detail
-
DEFAULT_HOSTNAME_VERIFICATION_ALGORITHM
public static final String DEFAULT_HOSTNAME_VERIFICATION_ALGORITHM
Default value to determine hostname verification algorithm hostname verification (for SSL/TLS) = null
-
DEFAULT_TRUST_ALL
public static final boolean DEFAULT_TRUST_ALL
The default value of whether all servers (SSL/TLS) should be trusted = false- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ClientSSLOptions
public ClientSSLOptions()
Default constructor
-
ClientSSLOptions
public ClientSSLOptions(ClientSSLOptions other)
Copy constructor- Parameters:
other
- the options to copy
-
ClientSSLOptions
public ClientSSLOptions(JsonObject json)
Create options from JSON- Parameters:
json
- the JSON
-
-
Method Detail
-
init
protected void init()
- Overrides:
init
in classSSLOptions
-
copy
public ClientSSLOptions copy()
- Overrides:
copy
in classSSLOptions
-
getHostnameVerificationAlgorithm
public String getHostnameVerificationAlgorithm()
- Returns:
- the value of the hostname verification algorithm
-
setHostnameVerificationAlgorithm
public ClientSSLOptions setHostnameVerificationAlgorithm(String hostnameVerificationAlgorithm)
Set the hostname verification algorithm interval- Parameters:
hostnameVerificationAlgorithm
- should be HTTPS, LDAPS or anull
- Returns:
- a reference to this, so the API can be used fluently
-
isTrustAll
public boolean isTrustAll()
- Returns:
true
if all server certificates should be trusted
-
setTrustAll
public ClientSSLOptions setTrustAll(boolean trustAll)
Set whether all server certificates should be trusted- Parameters:
trustAll
-true
if all should be trusted- Returns:
- a reference to this, so the API can be used fluently
-
setKeyCertOptions
public ClientSSLOptions setKeyCertOptions(KeyCertOptions options)
Description copied from class:SSLOptions
Set the key/cert options.- Overrides:
setKeyCertOptions
in classSSLOptions
- Parameters:
options
- the key store options- Returns:
- a reference to this, so the API can be used fluently
-
setTrustOptions
public ClientSSLOptions setTrustOptions(TrustOptions options)
Description copied from class:SSLOptions
Set the trust options.- Overrides:
setTrustOptions
in classSSLOptions
- Parameters:
options
- the trust options- Returns:
- a reference to this, so the API can be used fluently
-
setUseAlpn
public ClientSSLOptions setUseAlpn(boolean useAlpn)
Description copied from class:SSLOptions
Set the ALPN usage.- Overrides:
setUseAlpn
in classSSLOptions
- Parameters:
useAlpn
- true when Application-Layer Protocol Negotiation should be used
-
setSslHandshakeTimeout
public ClientSSLOptions setSslHandshakeTimeout(long sslHandshakeTimeout)
Description copied from class:SSLOptions
Set the SSL handshake timeout, default time unit is seconds.- Overrides:
setSslHandshakeTimeout
in classSSLOptions
- Parameters:
sslHandshakeTimeout
- the SSL handshake timeout to set, in milliseconds- Returns:
- a reference to this, so the API can be used fluently
-
setSslHandshakeTimeoutUnit
public ClientSSLOptions setSslHandshakeTimeoutUnit(TimeUnit sslHandshakeTimeoutUnit)
Description copied from class:SSLOptions
Set the SSL handshake timeout unit. If not specified, default is seconds.- Overrides:
setSslHandshakeTimeoutUnit
in classSSLOptions
- Parameters:
sslHandshakeTimeoutUnit
- specify time unit.- Returns:
- a reference to this, so the API can be used fluently
-
setEnabledSecureTransportProtocols
public ClientSSLOptions setEnabledSecureTransportProtocols(Set<String> enabledSecureTransportProtocols)
Description copied from class:SSLOptions
Sets the list of enabled SSL/TLS protocols.- Overrides:
setEnabledSecureTransportProtocols
in classSSLOptions
- Parameters:
enabledSecureTransportProtocols
- the SSL/TLS protocols to enable- Returns:
- a reference to this, so the API can be used fluently
-
setApplicationLayerProtocols
public ClientSSLOptions setApplicationLayerProtocols(List<String> protocols)
Description copied from class:SSLOptions
Set the list of application-layer protocols to provide to the server during the Application-Layer Protocol Negotiation.- Overrides:
setApplicationLayerProtocols
in classSSLOptions
- Parameters:
protocols
- the protocols- Returns:
- a reference to this, so the API can be used fluently
-
toJson
public JsonObject toJson()
Convert to JSON- Overrides:
toJson
in classSSLOptions
- Returns:
- the JSON
-
-