TlsUtils

object TlsUtils

Factory methods for building gRPC client and server TLS contexts from certificate files.

Functions

Link copied to clipboard
fun buildClientTlsContext(certChainFilePath: String = "", privateKeyFilePath: String = "", trustCertCollectionFilePath: String = ""): TlsContext

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

Link copied to clipboard
fun buildServerTlsContext(certChainFilePath: String, privateKeyFilePath: String, trustCertCollectionFilePath: String = ""): TlsContext

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

Link copied to clipboard
fun clientTlsContextBuilder(certChainFilePath: String = "", privateKeyFilePath: String = "", trustCertCollectionFilePath: String = ""): TlsContextBuilder

Creates a client-side TlsContextBuilder that can be further customized before building.

Link copied to clipboard
fun serverTlsContext(certChainFilePath: String, privateKeyFilePath: String, trustCertCollectionFilePath: String = ""): TlsContextBuilder

Creates a server-side TlsContextBuilder that can be further customized before building.