Revert "=str Remove manual hostname verifier support, used to be included only because Java 6 (#22320)"

Let's revert this until we have decided in #22345 what to do exactly
about it. We will still introduce an overload of TLS.apply that works
without specifying a `verifySession` function.

This reverts commit 021829e21e.

Conflicts:
	project/MiMa.scala
This commit is contained in:
Johannes Rudolph 2017-02-23 12:00:54 +01:00
parent b2759ab56a
commit e4491a05cf
6 changed files with 38 additions and 31 deletions

View file

@ -18,10 +18,11 @@ private[stream] final case class TlsModule(plainIn: Inlet[SslTlsOutbound], plain
cipherIn: Inlet[ByteString], cipherOut: Outlet[ByteString],
shape: Shape, attributes: Attributes,
createSSLEngine: ActorSystem SSLEngine, // ActorSystem is only needed to support the AkkaSSLConfig legacy, see #21753
verifySession: (ActorSystem, SSLSession) Try[Unit], // ActorSystem is only needed to support the AkkaSSLConfig legacy, see #21753
closing: TLSClosing) extends AtomicModule {
override def withAttributes(att: Attributes): TlsModule = copy(attributes = att)
override def carbonCopy: TlsModule = TlsModule(attributes, createSSLEngine, closing)
override def carbonCopy: TlsModule = TlsModule(attributes, createSSLEngine, verifySession, closing)
override def replaceShape(s: Shape) =
if (s != shape) {
@ -39,6 +40,7 @@ private[stream] object TlsModule {
def apply(
attributes: Attributes,
createSSLEngine: ActorSystem SSLEngine, // ActorSystem is only needed to support the AkkaSSLConfig legacy, see #21753
verifySession: (ActorSystem, SSLSession) Try[Unit], // ActorSystem is only needed to support the AkkaSSLConfig legacy, see #21753
closing: TLSClosing): TlsModule = {
val name = attributes.nameOrDefault(s"StreamTls()")
val cipherIn = Inlet[ByteString](s"$name.cipherIn")
@ -46,6 +48,6 @@ private[stream] object TlsModule {
val plainIn = Inlet[SslTlsOutbound](s"$name.transportIn")
val plainOut = Outlet[SslTlsInbound](s"$name.transportOut")
val shape = new BidiShape(plainIn, cipherOut, cipherIn, plainOut)
TlsModule(plainIn, plainOut, cipherIn, cipherOut, shape, attributes, createSSLEngine, closing)
TlsModule(plainIn, plainOut, cipherIn, cipherOut, shape, attributes, createSSLEngine, verifySession, closing)
}
}