Package io.quarkus.tls
Interface TlsConfiguration
- All Known Implementing Classes:
BaseTlsConfiguration,VertxCertificateHolder
public interface TlsConfiguration
The transport layer security configuration.
-
Method Summary
Modifier and TypeMethodDescriptionCreates and returns the SSL Context.static Optional<TlsConfiguration> from(TlsConfigurationRegistry registry, Optional<String> name) Returns the hostname verification algorithm for this configuration.Returns the key store.io.vertx.core.net.KeyCertOptionsReturns the key store options.default StringgetName()Returns the name which was associated with this configurationio.vertx.core.net.SSLOptionsReturns the (Vert.x) SSL options.Returns the trust store.io.vertx.core.net.TrustOptionsReturns the trust store options.default booleanReturns whether the trust store is configured to trust all certificates.booleanreload()Reloads the configuration.booleanusesSni()Returns whether the key store is configured to use SNI.
-
Method Details
-
from
-
getKeyStore
KeyStore getKeyStore()Returns the key store.- Returns:
- the key store if configured.
-
getKeyStoreOptions
io.vertx.core.net.KeyCertOptions getKeyStoreOptions()Returns the key store options.- Returns:
- the key store options if configured.
-
getTrustStore
KeyStore getTrustStore()Returns the trust store.- Returns:
- the trust store if configured.
-
getTrustStoreOptions
io.vertx.core.net.TrustOptions getTrustStoreOptions()Returns the trust store options.- Returns:
- the trust store options if configured.
-
getSSLOptions
io.vertx.core.net.SSLOptions getSSLOptions()Returns the (Vert.x) SSL options.- Returns:
- the
SSLOptions,nullif not configured.
-
createSSLContext
Creates and returns the SSL Context.- Returns:
- the
SSLContext,nullif not configured. - Throws:
Exception- if the SSL Context cannot be created.
-
isTrustAll
default boolean isTrustAll()Returns whether the trust store is configured to trust all certificates.- Returns:
trueif the trust store is configured to trust all certificates,falseotherwise.
-
getHostnameVerificationAlgorithm
Returns the hostname verification algorithm for this configuration."NONE"means no hostname verification.- Returns:
- the hostname verification algorithm.
-
usesSni
boolean usesSni()Returns whether the key store is configured to use SNI. When SNI is used, the client indicate the server name during the TLS handshake, allowing the server to select the right certificate.- Returns:
trueif the key store is configured to use SNI,falseotherwise.
-
reload
boolean reload()Reloads the configuration. It usually means reloading the key store and trust store, especially when they are files.- Returns:
trueif the configuration has been reloaded,falseotherwise.
-
getName
Returns the name which was associated with this configurationNote: Although this was made default in order to not break deep integrations, it is strongly recommended that the method be implemented.
-