Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildTLSConfig ¶
func BuildTLSConfig(scheme string, skipVerify bool, cert *tls.Certificate, pool *x509.CertPool) (*tls.Config, error)
BuildTLSConfig creates a *tls.Config based on the encryption scheme. For "off", it returns nil. For "mtls", a certificate is required.
func LoadCertPool ¶
LoadCertPool loads a certificate pool from the given CA cert file. If the file is empty, it returns nil.
func LoadCertificate ¶
func LoadCertificate(certFile, keyFile string) (*tls.Certificate, error)
LoadCertificate loads a TLS certificate from the given cert and key files. If both are empty, it returns nil. If only one is provided, it returns an error.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.