Class BaseTlsConfiguration

java.lang.Object
io.quarkus.tls.BaseTlsConfiguration
All Implemented Interfaces:
TlsConfiguration

public abstract class BaseTlsConfiguration extends Object implements TlsConfiguration
A base implementation of the transport layer security configuration interface.
  • Constructor Details

    • BaseTlsConfiguration

      public BaseTlsConfiguration()
  • Method Details

    • getKeyStore

      public KeyStore getKeyStore()
      Returns the key store.
      Specified by:
      getKeyStore in interface TlsConfiguration
      Returns:
      the key store if configured.
    • getKeyStoreOptions

      public io.vertx.core.net.KeyCertOptions getKeyStoreOptions()
      Returns the key store options.
      Specified by:
      getKeyStoreOptions in interface TlsConfiguration
      Returns:
      the key store options if configured.
    • getTrustStore

      public KeyStore getTrustStore()
      Returns the trust store.
      Specified by:
      getTrustStore in interface TlsConfiguration
      Returns:
      the trust store if configured.
    • getTrustStoreOptions

      public io.vertx.core.net.TrustOptions getTrustStoreOptions()
      Returns the trust store options.
      Specified by:
      getTrustStoreOptions in interface TlsConfiguration
      Returns:
      the trust store options if configured.
    • getSSLOptions

      public io.vertx.core.net.SSLOptions getSSLOptions()
      Returns the (Vert.x) SSL options.
      Specified by:
      getSSLOptions in interface TlsConfiguration
      Returns:
      the SSLOptions, null if not configured.
    • createSSLContext

      public SSLContext createSSLContext() throws Exception
      Creates and returns the SSL Context.
      Specified by:
      createSSLContext in interface TlsConfiguration
      Returns:
      the SSLContext, null if not configured.
      Throws:
      Exception - if the SSL Context cannot be created.
    • getHostnameVerificationAlgorithm

      public Optional<String> getHostnameVerificationAlgorithm()
      Returns the hostname verification algorithm for this configuration. "NONE" means no hostname verification.
      Specified by:
      getHostnameVerificationAlgorithm in interface TlsConfiguration
      Returns:
      the hostname verification algorithm.
    • usesSni

      public 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.
      Specified by:
      usesSni in interface TlsConfiguration
      Returns:
      true if the key store is configured to use SNI, false otherwise.
    • reload

      public boolean reload()
      Reloads the configuration. It usually means reloading the key store and trust store, especially when they are files.
      Specified by:
      reload in interface TlsConfiguration
      Returns:
      true if the configuration has been reloaded, false otherwise.
    • isTrustAll

      public boolean isTrustAll()
      Description copied from interface: TlsConfiguration
      Returns whether the trust store is configured to trust all certificates.
      Specified by:
      isTrustAll in interface TlsConfiguration
      Returns:
      true if the trust store is configured to trust all certificates, false otherwise.