This method will be consumed mainly by akka-http. (cherry picked from commit 7b7a82c1c13dce5710c6cc2923fc7490666d8c79)
This commit is contained in:
parent
e4491a05cf
commit
9be52cb2c9
1 changed files with 14 additions and 0 deletions
|
|
@ -167,6 +167,20 @@ object TLS {
|
|||
closing: TLSClosing
|
||||
): scaladsl.BidiFlow[SslTlsOutbound, ByteString, ByteString, SslTlsInbound, NotUsed] =
|
||||
new scaladsl.BidiFlow(TlsModule(Attributes.none, _ ⇒ createSSLEngine(), (_, session) ⇒ verifySession(session), closing))
|
||||
|
||||
/**
|
||||
* Create a StreamTls [[akka.stream.scaladsl.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]].
|
||||
*/
|
||||
def apply(
|
||||
createSSLEngine: () ⇒ SSLEngine, // we don't offer the internal `ActorSystem => SSLEngine` API here, see #21753
|
||||
closing: TLSClosing
|
||||
): scaladsl.BidiFlow[SslTlsOutbound, ByteString, ByteString, SslTlsInbound, NotUsed] =
|
||||
apply(createSSLEngine, _ ⇒ Success(()), closing)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue