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 StringDEFAULT_HOSTNAME_VERIFICATION_ALGORITHMDefault value to determine hostname verification algorithm hostname verification (for SSL/TLS) = nullstatic booleanDEFAULT_TRUST_ALLThe 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 ClientSSLOptionscopy()StringgetHostnameVerificationAlgorithm()protected voidinit()booleanisTrustAll()ClientSSLOptionssetApplicationLayerProtocols(List<String> protocols)Set the list of application-layer protocols to provide to the server during the Application-Layer Protocol Negotiation.ClientSSLOptionssetEnabledSecureTransportProtocols(Set<String> enabledSecureTransportProtocols)Sets the list of enabled SSL/TLS protocols.ClientSSLOptionssetHostnameVerificationAlgorithm(String hostnameVerificationAlgorithm)Set the hostname verification algorithm intervalClientSSLOptionssetKeyCertOptions(KeyCertOptions options)Set the key/cert options.ClientSSLOptionssetSslHandshakeTimeout(long sslHandshakeTimeout)Set the SSL handshake timeout, default time unit is seconds.ClientSSLOptionssetSslHandshakeTimeoutUnit(TimeUnit sslHandshakeTimeoutUnit)Set the SSL handshake timeout unit.ClientSSLOptionssetTrustAll(boolean trustAll)Set whether all server certificates should be trustedClientSSLOptionssetTrustOptions(TrustOptions options)Set the trust options.ClientSSLOptionssetUseAlpn(boolean useAlpn)Set the ALPN usage.JsonObjecttoJson()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:
initin classSSLOptions
-
copy
public ClientSSLOptions copy()
- Overrides:
copyin 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:
trueif all server certificates should be trusted
-
setTrustAll
public ClientSSLOptions setTrustAll(boolean trustAll)
Set whether all server certificates should be trusted- Parameters:
trustAll-trueif 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:SSLOptionsSet the key/cert options.- Overrides:
setKeyCertOptionsin 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:SSLOptionsSet the trust options.- Overrides:
setTrustOptionsin 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:SSLOptionsSet the ALPN usage.- Overrides:
setUseAlpnin classSSLOptions- Parameters:
useAlpn- true when Application-Layer Protocol Negotiation should be used
-
setSslHandshakeTimeout
public ClientSSLOptions setSslHandshakeTimeout(long sslHandshakeTimeout)
Description copied from class:SSLOptionsSet the SSL handshake timeout, default time unit is seconds.- Overrides:
setSslHandshakeTimeoutin 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:SSLOptionsSet the SSL handshake timeout unit. If not specified, default is seconds.- Overrides:
setSslHandshakeTimeoutUnitin 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:SSLOptionsSets the list of enabled SSL/TLS protocols.- Overrides:
setEnabledSecureTransportProtocolsin 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:SSLOptionsSet the list of application-layer protocols to provide to the server during the Application-Layer Protocol Negotiation.- Overrides:
setApplicationLayerProtocolsin 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:
toJsonin classSSLOptions- Returns:
- the JSON
-
-