Class ClientSSLOptions
java.lang.Object
io.vertx.core.net.SSLOptions
io.vertx.core.net.ClientSSLOptions
Client SSL options.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDefault value to determine hostname verification algorithm hostname verification (for SSL/TLS) = nullstatic final booleanThe default value of whether all servers (SSL/TLS) should be trusted = false -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorClientSSLOptions(JsonObject json) Create options from JSONClientSSLOptions(ClientSSLOptions other) Copy constructor -
Method Summary
Modifier and TypeMethodDescriptionaddCrlPath(String crlPath) Add a CRL pathaddCrlValue(Buffer crlValue) Add a CRL valueaddEnabledCipherSuite(String suite) Add an enabled cipher suite, appended to the ordered suites.addEnabledSecureTransportProtocol(String protocol) Add an enabled SSL/TLS protocols, appended to the ordered protocols.copy()protected voidinit()booleanremoveEnabledCipherSuite(String suite) Removes an enabled cipher suite from the ordered suites.removeEnabledSecureTransportProtocol(String protocol) Removes an enabled SSL/TLS protocol from the ordered protocols.setApplicationLayerProtocols(List<String> protocols) Set the list of application-layer protocols to provide to the server during the Application-Layer Protocol Negotiation.setEnabledSecureTransportProtocols(Set<String> enabledSecureTransportProtocols) Sets the list of enabled SSL/TLS protocols.setHostnameVerificationAlgorithm(String hostnameVerificationAlgorithm) Set the hostname verification algorithm intervalsetKeyCertOptions(KeyCertOptions options) Set the key/cert options.setSslHandshakeTimeout(long sslHandshakeTimeout) Set the SSL handshake timeout, default time unit is seconds.setSslHandshakeTimeoutUnit(TimeUnit sslHandshakeTimeoutUnit) Set the SSL handshake timeout unit.setTrustAll(boolean trustAll) Set whether all server certificates should be trustedsetTrustOptions(TrustOptions options) Set the trust options.setUseAlpn(boolean useAlpn) Set the ALPN usage.setUseHybridKeyExchangeProtocol(boolean useHybridKeyExchangeProtocol) Enable or disable the hybrid post-quantum key exchange protocol X25519MLKEM768.toJson()Convert to JSONMethods inherited from class SSLOptions
equals, getApplicationLayerProtocols, getCrlPaths, getCrlValues, getEnabledCipherSuites, getEnabledSecureTransportProtocols, getKeyCertOptions, getSslHandshakeTimeout, getSslHandshakeTimeoutUnit, getTrustOptions, hashCode, isUseAlpn, isUseHybridKeyExchangeProtocol
-
Field Details
-
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_ALLThe default value of whether all servers (SSL/TLS) should be trusted = false- See Also:
-
-
Constructor Details
-
ClientSSLOptions
public ClientSSLOptions()Default constructor -
ClientSSLOptions
Copy constructor- Parameters:
other- the options to copy
-
ClientSSLOptions
-
-
Method Details
-
init
protected void init()- Overrides:
initin classSSLOptions
-
copy
- Overrides:
copyin classSSLOptions
-
getHostnameVerificationAlgorithm
- Returns:
- the value of the hostname verification algorithm
-
setHostnameVerificationAlgorithm
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
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
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
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
Description copied from class:SSLOptionsSet the ALPN usage.- Overrides:
setUseAlpnin classSSLOptions- Parameters:
useAlpn- true when Application-Layer Protocol Negotiation should be used
-
setUseHybridKeyExchangeProtocol
Description copied from class:SSLOptionsEnable or disable the hybrid post-quantum key exchange protocol X25519MLKEM768.When enabled, TLS connections will use X25519MLKEM768 for key exchange, providing protection against quantum computer attacks.
This feature requires OpenSSL and will not work with the JDK SSL engine. You must:
- Use
OpenSSLEngineOptionsas the SSL engine - Have
io.netty:netty-tcnative-classeson the classpath - Have an OpenSSL provider (e.g.
io.smallrye:smallrye-openssl) on the classpath
- Overrides:
setUseHybridKeyExchangeProtocolin classSSLOptions- Parameters:
useHybridKeyExchangeProtocol-trueto enable hybrid key exchange- Returns:
- a reference to this, so the API can be used fluently
- Use
-
setSslHandshakeTimeout
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
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
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
-
addCrlPath
Description copied from class:SSLOptionsAdd a CRL path- Overrides:
addCrlPathin classSSLOptions- Parameters:
crlPath- the path- Returns:
- a reference to this, so the API can be used fluently
- Throws:
NullPointerException
-
addCrlValue
Description copied from class:SSLOptionsAdd a CRL value- Overrides:
addCrlValuein classSSLOptions- Parameters:
crlValue- the value- Returns:
- a reference to this, so the API can be used fluently
- Throws:
NullPointerException
-
removeEnabledCipherSuite
Description copied from class:SSLOptionsRemoves an enabled cipher suite from the ordered suites.- Overrides:
removeEnabledCipherSuitein classSSLOptions- Parameters:
suite- the suite- Returns:
- a reference to this, so the API can be used fluently
-
addEnabledSecureTransportProtocol
Description copied from class:SSLOptionsAdd an enabled SSL/TLS protocols, appended to the ordered protocols.- Overrides:
addEnabledSecureTransportProtocolin classSSLOptions- Parameters:
protocol- the SSL/TLS protocol to enable- Returns:
- a reference to this, so the API can be used fluently
-
removeEnabledSecureTransportProtocol
Description copied from class:SSLOptionsRemoves an enabled SSL/TLS protocol from the ordered protocols.- Overrides:
removeEnabledSecureTransportProtocolin classSSLOptions- Parameters:
protocol- the SSL/TLS protocol to disable- Returns:
- a reference to this, so the API can be used fluently
-
addEnabledCipherSuite
Description copied from class:SSLOptionsAdd an enabled cipher suite, appended to the ordered suites.- Overrides:
addEnabledCipherSuitein classSSLOptions- Parameters:
suite- the suite- Returns:
- a reference to this, so the API can be used fluently
- See Also:
-
toJson
-