update Akka refs in PekkoSSLConfig.scala (#198)

This commit is contained in:
PJ Fanning 2023-02-16 13:10:35 +01:00 committed by GitHub
parent 2db1833f27
commit 36377c6c9a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,7 +24,8 @@ import pekko.annotation.InternalApi
import pekko.event.Logging
import scala.annotation.nowarn
@deprecated("Use Tcp and TLS with SSLEngine parameters instead. Setup the SSLEngine with needed parameters.", "2.6.0")
@deprecated("Use Tcp and TLS with SSLEngine parameters instead. Setup the SSLEngine with needed parameters.",
"Akka 2.6.0")
object PekkoSSLConfig extends ExtensionId[PekkoSSLConfig] with ExtensionIdProvider {
//////////////////// EXTENSION SETUP ///////////////////
@ -39,14 +40,15 @@ object PekkoSSLConfig extends ExtensionId[PekkoSSLConfig] with ExtensionIdProvid
new PekkoSSLConfig(system, defaultSSLConfigSettings(system))
def defaultSSLConfigSettings(system: ActorSystem): SSLConfigSettings = {
val akkaOverrides = system.settings.config.getConfig("pekko.ssl-config")
val pekkoOverrides = system.settings.config.getConfig("pekko.ssl-config")
val defaults = system.settings.config.getConfig("ssl-config")
SSLConfigFactory.parse(akkaOverrides.withFallback(defaults))
SSLConfigFactory.parse(pekkoOverrides.withFallback(defaults))
}
}
@deprecated("Use Tcp and TLS with SSLEngine parameters instead. Setup the SSLEngine with needed parameters.", "2.6.0")
@deprecated("Use Tcp and TLS with SSLEngine parameters instead. Setup the SSLEngine with needed parameters.",
"Akka 2.6.0")
final class PekkoSSLConfig(system: ExtendedActorSystem, val config: SSLConfigSettings) extends Extension {
private val mkLogger = new PekkoLoggerFactory(system)
@ -143,6 +145,8 @@ final class PekkoSSLConfig(system: ExtendedActorSystem, val config: SSLConfigSet
v
}
@deprecated("validateDefaultTrustManager is not doing anything since akka 2.6.19 and should not be used",
"Akka 2.6.19")
def validateDefaultTrustManager(@nowarn("msg=never used") sslConfig: SSLConfigSettings): Unit = {
log.warning(
"validateDefaultTrustManager is not doing anything since akka 2.6.19, it was useful only in Java 7 and below");