Class ServerSSLOptions
java.lang.Object
io.vertx.core.net.SSLOptions
io.vertx.core.net.ServerSSLOptions
Server SSL options.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ClientAuthDefault value of whether client auth is required (SSL/TLS) = Nostatic final booleanDefault value of whether the server supports SNI = false -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorServerSSLOptions(JsonObject json) Create options from JSONServerSSLOptions(ServerSSLOptions 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()booleanisSni()removeEnabledCipherSuite(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.setClientAuth(ClientAuth clientAuth) Set whether client auth is requiredsetEnabledSecureTransportProtocols(Set<String> enabledSecureTransportProtocols) Sets the list of enabled SSL/TLS protocols.setKeyCertOptions(KeyCertOptions options) Set the key/cert options.setSni(boolean sni) Set whether the server supports Server Name IndiciationsetSslHandshakeTimeout(long sslHandshakeTimeout) Set the SSL handshake timeout, default time unit is seconds.setSslHandshakeTimeoutUnit(TimeUnit sslHandshakeTimeoutUnit) Set the SSL handshake timeout unit.setTrustOptions(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_CLIENT_AUTH
Default value of whether client auth is required (SSL/TLS) = No -
DEFAULT_SNI
public static final boolean DEFAULT_SNIDefault value of whether the server supports SNI = false- See Also:
-
-
Constructor Details
-
ServerSSLOptions
public ServerSSLOptions()Default constructor -
ServerSSLOptions
Copy constructor- Parameters:
other- the options to copy
-
ServerSSLOptions
-
-
Method Details
-
init
protected void init()- Overrides:
initin classSSLOptions
-
copy
- Overrides:
copyin classSSLOptions
-
getClientAuth
-
setClientAuth
Set whether client auth is required- Parameters:
clientAuth- One of "NONE, REQUEST, REQUIRED". If it's set to "REQUIRED" then server will require the SSL cert to be presented otherwise it won't accept the request. If it's set to "REQUEST" then it won't mandate the certificate to be presented, basically make it optional.- Returns:
- a reference to this, so the API can be used fluently
-
isSni
public boolean isSni()- Returns:
- whether the server supports Server Name Indication
-
setSni
Set whether the server supports Server Name Indiciation- 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 ServerSSLOptions 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
-
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:
-
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
-
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
-
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
-
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
-
toJson
-