SSL Config
libraryDependencies += "com.avast" %% "sst-ssl-config" % "0.18.4"
This subproject allows you to create SSL context (javax.net.ssl.SSLContext
) from a configuration file. It uses SSL Config
library to do so which means that this module is different than others and receives directly com.typesafe.config.Config
instead of
configuration case classes. See the documentation of SSL Config for more information.
Loading of SSL context is side-effectful so it is wrapped in F
which is Sync
.
import com.avast.sst.ssl.SslContextModule
import com.typesafe.config.ConfigFactory
import zio.interop.catz.*
import zio.Task
val config = ConfigFactory.load().getConfig("ssl-config")
val sslContext = SslContextModule.make[Task](config)