Package com.yahoo.jrt

Class MaybeTlsCryptoEngine

  • All Implemented Interfaces:
    CryptoEngine, java.lang.AutoCloseable

    public class MaybeTlsCryptoEngine
    extends java.lang.Object
    implements CryptoEngine
    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 Detail

      • MaybeTlsCryptoEngine

        public MaybeTlsCryptoEngine​(TlsCryptoEngine tlsEngine,
                                    boolean useTlsWhenClient)
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface CryptoEngine