pekko/akka-remote/src/test/scala/akka/remote/Ticket1978ConfigSpec.scala

32 lines
1.2 KiB
Scala
Raw Normal View History

package akka.remote
import akka.testkit._
import akka.actor._
import com.typesafe.config._
import scala.concurrent.duration._
import java.util.ArrayList
import akka.remote.transport.netty.SSLSettings
@org.junit.runner.RunWith(classOf[org.scalatest.junit.JUnitRunner])
class Ticket1978ConfigSpec extends AkkaSpec("""
akka.remote.netty.ssl.security {
random-number-generator = "AES128CounterSecureRNG"
}
""") with ImplicitSender with DefaultTimeout {
"SSL Remoting" must {
"be able to parse these extra Netty config elements" in {
val settings = new SSLSettings(system.settings.config.getConfig("akka.remote.netty.ssl.security"))
2015-01-16 11:09:59 +01:00
settings.SSLKeyStore should ===(Some("keystore"))
settings.SSLKeyStorePassword should ===(Some("changeme"))
settings.SSLKeyPassword should ===(Some("changeme"))
settings.SSLTrustStore should ===(Some("truststore"))
settings.SSLTrustStorePassword should ===(Some("changeme"))
settings.SSLProtocol should ===(Some("TLSv1"))
settings.SSLEnabledAlgorithms should ===(Set("TLS_RSA_WITH_AES_128_CBC_SHA"))
settings.SSLRandomNumberGenerator should ===(Some("AES128CounterSecureRNG"))
}
}
}