Class TribesSslContext
java.lang.Object
org.apache.catalina.tribes.transport.TribesSslContext
- All Implemented Interfaces:
AutoCloseable
The pair (client and server) of TLS contexts used by a Tribes channel.
-
Constructor Summary
ConstructorsConstructorDescriptionTribesSslContext(String identity, String key, String digest, String protocol) Creates the pair of client and server TLS contexts to be used by a Tribes channel. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Creates a new SSL engine for client-side use.Creates a new SSL engine for server-side use.Returns the name of the TLS implementation in use.
-
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 identitykey- The pre-shared key as a hex encoded stringdigest- The name of the message digest algorithm used to derive the pre-shared key, for exampleSHA256protocol- The TLS protocol name, for exampleTLSv1.3- Throws:
Exception- if the TLS contexts could not be created
-
-
Method Details
-
createClientEngine
Creates a new SSL engine for client-side use.- Returns:
- the new client SSL engine
-
createServerEngine
Creates a new SSL engine for server-side use.- Returns:
- the new server SSL engine
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
getImplementationName
Returns the name of the TLS implementation in use.- Returns:
TLS-OpenSSL-FFMif the OpenSSL FFM implementation is used, otherwiseTLS-OpenSSL
-