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.addKeyExchangeGroup(String group) Add a key exchange group name.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.setKeyExchangeGroups(List<String> keyExchangeGroups) Set the list of key exchange group names to use for TLS connections.setPqcEnforcementPolicy(PqcEnforcementPolicy pqcEnforcementPolicy) Set the post-quantum cryptography enforcement policy.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.toJson()Convert to JSONMethods inherited from class SSLOptions
equals, getApplicationLayerProtocols, getCrlPaths, getCrlValues, getEnabledCipherSuites, getEnabledSecureTransportProtocols, getKeyCertOptions, getKeyExchangeGroups, getPqcEnforcementPolicy, getSslHandshakeTimeout, getSslHandshakeTimeoutUnit, getTrustOptions, hashCode, isUseAlpn
-
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
-
setKeyExchangeGroups
Description copied from class:SSLOptionsSet the list of key exchange group names to use for TLS connections.The effective groups used during the TLS handshake depend on the
SSLOptions.getPqcEnforcementPolicy():PqcEnforcementPolicy.RELAXED: uses the specified groups as-is, or engine defaults ifnullPqcEnforcementPolicy.CLIENT_NEGOTIATED: prependsX25519MLKEM768if not already presentPqcEnforcementPolicy.STRICT: replaces the list with onlyX25519MLKEM768
- Overrides:
setKeyExchangeGroupsin classSSLOptions- Parameters:
keyExchangeGroups- the key exchange group names- Returns:
- a reference to this, so the API can be used fluently
-
addKeyExchangeGroup
Description copied from class:SSLOptionsAdd a key exchange group name.- Overrides:
addKeyExchangeGroupin classSSLOptions- Parameters:
group- the group name to add- Returns:
- a reference to this, so the API can be used fluently
-
setPqcEnforcementPolicy
Description copied from class:SSLOptionsSet the post-quantum cryptography enforcement policy.When set to
PqcEnforcementPolicy.STRICTorPqcEnforcementPolicy.CLIENT_NEGOTIATED, the SSL engine will be automatically switched to OpenSSL if not already configured.- Overrides:
setPqcEnforcementPolicyin classSSLOptions- Parameters:
pqcEnforcementPolicy- the enforcement policy- Returns:
- a reference to this, so the API can be used fluently
-
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
-