buildServerTlsContext

fun buildServerTlsContext(certChainFilePath: String, privateKeyFilePath: String, trustCertCollectionFilePath: String = ""): TlsContext

Builds a complete server-side TlsContext ready for use with a gRPC server.

Return

a TlsContext containing the built SslContext

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

for any of the reasons serverTlsContext gives

if Netty cannot build a context from material that did parse, such as a certificate chain in which one certificate is not issued by the next