Package com.yahoo.jrt
Class MaybeTlsCryptoEngine
java.lang.Object
com.yahoo.jrt.MaybeTlsCryptoEngine
- All Implemented Interfaces:
CryptoEngine
,AutoCloseable
A crypto engine that supports both tls encrypted connections and
unencrypted connections. The use of tls for incoming connections is
auto-detected using clever heuristics. The use of tls for outgoing
connections is controlled by the useTlsWhenClient flag given to the
constructor.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
createClientCryptoSocket
(SocketChannel channel, Spec spec) createServerCryptoSocket
(SocketChannel channel) toString()
-
Constructor Details
-
MaybeTlsCryptoEngine
-
-
Method Details
-
createClientCryptoSocket
- Specified by:
createClientCryptoSocket
in interfaceCryptoEngine
-
createServerCryptoSocket
- Specified by:
createServerCryptoSocket
in interfaceCryptoEngine
-
toString
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCryptoEngine
-