serverTlsContext
fun serverTlsContext(certChainFilePath: String, privateKeyFilePath: String, trustCertCollectionFilePath: String = ""): TlsContextBuilder
Creates a server-side TlsContextBuilder that can be further customized before building.
If trustCertCollectionFilePath is provided, mutual authentication (client cert required) is enabled.
The builder comes from GrpcSslContexts, so it already has the ALPN configuration that NettyServerBuilder.sslContext requires: a context built straight from it is accepted by com.pambrose.common.dsl.GrpcDsl.server.
Return
a TlsContextBuilder wrapping the configured SslContextBuilder
Parameters
certChainFilePath
path to the server certificate chain file (required)
privateKeyFilePath
path to the server private key file (required)
trustCertCollectionFilePath
path to the trusted client CA certificates (enables mutual auth)
Throws
if SSL context builder creation fails
if a required path is empty, or a given file does not exist