Class TribesSslContext

java.lang.Object
org.apache.catalina.tribes.transport.TribesSslContext
All Implemented Interfaces:
AutoCloseable

public class TribesSslContext extends Object implements AutoCloseable
The pair (client and server) of TLS contexts used by a Tribes channel.
  • Constructor Details

    • TribesSslContext

      public TribesSslContext(String identity, String key, String digest, String protocol) throws Exception
      Creates the pair of client and server TLS contexts to be used by a Tribes channel. The OpenSSL FFM implementation is used where available, otherwise the Tomcat Native implementation is used.
      Parameters:
      identity - The pre-shared key identity
      key - The pre-shared key as a hex encoded string
      digest - The name of the message digest algorithm used to derive the pre-shared key, for example SHA256
      protocol - The TLS protocol name, for example TLSv1.3
      Throws:
      Exception - if the TLS contexts could not be created
  • Method Details

    • createClientEngine

      public SSLEngine createClientEngine()
      Creates a new SSL engine for client-side use.
      Returns:
      the new client SSL engine
    • createServerEngine

      public SSLEngine createServerEngine()
      Creates a new SSL engine for server-side use.
      Returns:
      the new server SSL engine
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • getImplementationName

      public String getImplementationName()
      Returns the name of the TLS implementation in use.
      Returns:
      TLS-OpenSSL-FFM if the OpenSSL FFM implementation is used, otherwise TLS-OpenSSL