Class TLS$


  • public class TLS$
    extends java.lang.Object
    Create a StreamTls BidiFlow. The SSLContext will be used to create an SSLEngine to which then the firstSession parameters are applied before initiating the first handshake. The role parameter determines the SSLEngine’s role; this is often the same as the underlying transport’s server or client role, but that is not a requirement and depends entirely on the application protocol.

    For a description of the closing parameter please refer to TLSClosing.

    The hostInfo parameter allows to optionally specify a pair of hostname and port that will be used when creating the SSLEngine with sslContext.createSslEngine. The SSLEngine may use this information e.g. when an endpoint identification algorithm was configured using javax.net.ssl.SSLParameters.setEndpointIdentificationAlgorithm.

    • Field Detail

      • MODULE$

        public static final TLS$ MODULE$
        Static reference to the singleton instance of this Scala object.
    • Constructor Detail

      • TLS$

        public TLS$()
    • Method Detail

      • apply

        public BidiFlow<TLSProtocol.SslTlsOutbound,​ByteString,​ByteString,​TLSProtocol.SslTlsInbound,​NotUsed> apply​(javax.net.ssl.SSLContext sslContext,
                                                                                                                                          TLSProtocol.NegotiateNewSession firstSession,
                                                                                                                                          TLSRole role,
                                                                                                                                          TLSClosing closing,
                                                                                                                                          scala.Option<scala.Tuple2<java.lang.String,​java.lang.Object>> hostInfo)
        Create a StreamTls BidiFlow. The SSLContext will be used to create an SSLEngine to which then the firstSession parameters are applied before initiating the first handshake. The role parameter determines the SSLEngine&rsquo;s role; this is often the same as the underlying transport&rsquo;s server or client role, but that is not a requirement and depends entirely on the application protocol.

        For a description of the closing parameter please refer to TLSClosing.

        The hostInfo parameter allows to optionally specify a pair of hostname and port that will be used when creating the SSLEngine with sslContext.createSslEngine. The SSLEngine may use this information e.g. when an endpoint identification algorithm was configured using javax.net.ssl.SSLParameters.setEndpointIdentificationAlgorithm.

        Parameters:
        sslContext - (undocumented)
        firstSession - (undocumented)
        role - (undocumented)
        closing - (undocumented)
        hostInfo - (undocumented)
        Returns:
        (undocumented)
      • apply

        public BidiFlow<TLSProtocol.SslTlsOutbound,​ByteString,​ByteString,​TLSProtocol.SslTlsInbound,​NotUsed> apply​(javax.net.ssl.SSLContext sslContext,
                                                                                                                                          TLSProtocol.NegotiateNewSession firstSession,
                                                                                                                                          TLSRole role)
        Create a StreamTls BidiFlow. The SSLContext will be used to create an SSLEngine to which then the firstSession parameters are applied before initiating the first handshake. The role parameter determines the SSLEngine&rsquo;s role; this is often the same as the underlying transport&rsquo;s server or client role, but that is not a requirement and depends entirely on the application protocol.
        Parameters:
        sslContext - (undocumented)
        firstSession - (undocumented)
        role - (undocumented)
        Returns:
        (undocumented)
      • apply

        public BidiFlow<TLSProtocol.SslTlsOutbound,​ByteString,​ByteString,​TLSProtocol.SslTlsInbound,​NotUsed> apply​(scala.Function0<javax.net.ssl.SSLEngine> createSSLEngine,
                                                                                                                                          scala.Function1<javax.net.ssl.SSLSession,​scala.util.Try<scala.runtime.BoxedUnit>> verifySession,
                                                                                                                                          TLSClosing closing)
        Create a StreamTls BidiFlow. This is a low-level interface.

        You can specify a constructor to create an SSLEngine that must already be configured for client and server mode and with all the parameters for the first session.

        You can specify a verification function that will be called after every successful handshake to verify additional session information.

        For a description of the closing parameter please refer to TLSClosing.

        Parameters:
        createSSLEngine - (undocumented)
        verifySession - (undocumented)
        closing - (undocumented)
        Returns:
        (undocumented)
      • apply

        public BidiFlow<TLSProtocol.SslTlsOutbound,​ByteString,​ByteString,​TLSProtocol.SslTlsInbound,​NotUsed> apply​(scala.Function0<javax.net.ssl.SSLEngine> createSSLEngine,
                                                                                                                                          TLSClosing closing)
        Create a StreamTls BidiFlow. This is a low-level interface.

        You can specify a constructor to create an SSLEngine that must already be configured for client and server mode and with all the parameters for the first session.

        For a description of the closing parameter please refer to TLSClosing.

        Parameters:
        createSSLEngine - (undocumented)
        closing - (undocumented)
        Returns:
        (undocumented)
      • apply$default$5

        public TLSClosing apply$default$5()
      • apply$default$6

        public scala.Option<scala.Tuple2<java.lang.String,​java.lang.Object>> apply$default$6()