java.lang.Object
io.helidon.nima.common.tls.Tls

public abstract sealed class Tls extends Object
TLS configuration - common for server and client.
  • Field Details

  • Method Details

    • builder

      public static Tls.Builder builder()
      A new fluent API builder.
      Returns:
      builder
    • create

      public static Tls create(Config config)
      Create TLS configuration from config.
      Parameters:
      config - located on the node of the tls configuration (usually this is ssl)
      Returns:
      a new TLS configuration
    • newEngine

      public final SSLEngine newEngine()
      SSL engine from this configuration.
      Returns:
      SSL Engine
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • createServerSocket

      public SSLServerSocket createServerSocket()
      Create a TLS socket for a server.
      Returns:
      a new server socket ready for TLS communication
    • createSocket

      public SSLSocket createSocket(String alpnProtocol)
      Create a socket for the chosen protocol.
      Parameters:
      alpnProtocol - protocol to use
      Returns:
      a new socket ready for TLS communication
    • sslContext

      public SSLContext sslContext()
      SSL context based on the configured values.
      Returns:
      SSL context
    • sslParameters

      public SSLParameters sslParameters()
      SSL parameters.
      Returns:
      SSL parameters
    • reload

      public void reload(Tls tls)
      Reload reloadable TLS components with the new configuration.
      Parameters:
      tls - new TLS configuration
    • enabled

      public boolean enabled()
      Whether this TLS configuration is enabled or not.
      Returns:
      whether TLS is enabled