Class ConfiguredTlsManager

java.lang.Object
io.helidon.webserver.ConfiguredTlsManager
All Implemented Interfaces:
TlsManager

public class ConfiguredTlsManager extends Object implements TlsManager
The default configured TlsManager implementation.
  • Constructor Details

    • ConfiguredTlsManager

      protected ConfiguredTlsManager(String name, String type)
      Configured tls manager constructor.
      Parameters:
      name - the manager name
      type - the manager type
  • Method Details

    • name

      public String name()
      The manager name.
      Returns:
      manager name
    • type

      public String type()
      The manager type.
      Returns:
      manager type
    • sslContext

      public SSLContext sslContext()
      Description copied from interface: TlsManager
      SSL context created by this manager. This method is called only after TlsManager.init(WebServerTls) and only if WebServerTls.enabled() is true.
      Specified by:
      sslContext in interface TlsManager
      Returns:
      the SSL context to use
    • subscribe

      public void subscribe(Consumer<SSLContext> sslContextConsumer)
      Description copied from interface: TlsManager
      Callers can subscribe to updates to be notified when the SSL context changes.
      Specified by:
      subscribe in interface TlsManager
      Parameters:
      sslContextConsumer - the consumer that will receive the new/update context after it has been reloaded by the manager
    • init

      public void init(WebServerTls tlsConfig)
      Description copied from interface: TlsManager
      Always called before any other method on this type. This method is only called when TLS is enabled and no explicit SSLContext was passed to the builder. In case the TLS is disabled, none of the methods on this type can be called.
      Specified by:
      init in interface TlsManager
      Parameters:
      tlsConfig - TLS configuration
    • initSslContext

      @Deprecated protected void initSslContext(WebServerTls tlsConfig, KeyManager[] keyManagers, TrustManager[] trustManagers)
      Deprecated.
      this method will be removed in a future release.
      Initialize and set the SSL context given the provided configuration.
      Parameters:
      tlsConfig - the tls config
      keyManagers - the key managers
      trustManagers - the trust managers
    • reload

      @Deprecated protected void reload(WebServerTls tlsConfig, KeyManager[] keyManagers, TrustManager[] trustManagers)
      Deprecated.
      this method will be removed in a future release.
      Called when there is a new SSLContext.
      Parameters:
      tlsConfig - the tls config
      keyManagers - the key managers
      trustManagers - the trust managers
    • secureRandom

      protected SecureRandom secureRandom(WebServerTls tlsConfig)
      Load secure random.
      Parameters:
      tlsConfig - TLS configuration
      Returns:
      secure random
    • trustAllTmf

      protected TrustManagerFactory trustAllTmf()
      Creates a trust all trust manager factory.
      Returns:
      a new trust manager factory trusting all
    • createTmf

      @Deprecated protected TrustManagerFactory createTmf(WebServerTls tlsConfig)
      Deprecated.
      this method will be removed in a future release.
      Create a new trust manager factory based on the configuration (i.e., the algorithm and provider).
      Parameters:
      tlsConfig - TLS config
      Returns:
      a new trust manager factory
    • configureAndSet

      @Deprecated protected void configureAndSet(WebServerTls tlsConfig, SSLContext sslContext)
      Deprecated.
      this method will be removed in a future release.
      Configure the SSLContext based upon configuration, and then store the instance.
      Parameters:
      tlsConfig - TLS config
      sslContext - ssl context to store