Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTLSConfig ¶
CreateTLSConfig creates a TLS configuration with client certificate and optional CA
func LoadCACertPool ¶
LoadCACertPool loads CA certificates from file
func LoadClientCertificate ¶
func LoadClientCertificate(certFile, keyFile, password string) (tls.Certificate, error)
LoadClientCertificate loads a client certificate from PEM or PKCS#12 file
Types ¶
type Config ¶
type Config struct {
// TLSCertFile is the PEM certificate file OR .p12/.pfx file
TLSCertFile string `koanf:"tlscertfile"`
// TLSKeyFile is the PEM key file (not used if TLSCertFile is .p12/.pfx)
TLSKeyFile string `koanf:"tlskeyfile"`
// TLSKeyPassword is the password for encrypted key or .p12/.pfx file
TLSKeyPassword string `koanf:"tlskeypassword"`
// TLSCAFile is the CA certificate file (or bundle) used to verify server/peer certificates
TLSCAFile string `koanf:"tlscafile"`
}
Click to show internal directories.
Click to hide internal directories.