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