Help us shape the future of Go! Take the 2026 Go Developer Survey

tlsconfig

package
v1.8.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2026 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TlsConfig

type TlsConfig struct{}

func (*TlsConfig) GetClientTlsConfig

func (t *TlsConfig) GetClientTlsConfig(serverCaCertPemPath []string,
	clientCertPemPath string,
	clientKeyPemPath string) (*tls.Config, error)

GetClientTlsConfig returns *tls.config configured for server TLS or mTLS based on parameters

serverCaCertPath = (required) one or more server ca cert path and file name, required for both server TLS or mTLS clientCertPemPath = (optional) for mTLS setup, path and file name to the client cert pem (unencrypted version) clientKeyPemPath = (optional) for mTLS setup, path and file name to the client key pem (unencrypted version)

func (*TlsConfig) GetServerTlsConfig

func (t *TlsConfig) GetServerTlsConfig(serverCertPemPath string,
	serverKeyPemPath string,
	clientCaCertPemPath []string) (*tls.Config, error)

GetServerTlsConfig returns *tls.config configured for server TLS or mTLS based on parameters

serverCertPemPath = (required) path and file name to the server cert pem (unencrypted version) serverKeyPemPath = (required) path and file name to the server key pem (unencrypted version) clientCaCertPath = (optional) one or more client ca cert path and file name, in case tls.config is for mTLS

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL