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 {
// CertFile is the path to a PEM certificate file OR .p12/.pfx file
CertFile string
// KeyFile is the path to a PEM key file (not used if CertFile is .p12/.pfx)
KeyFile string
// Password is the password for encrypted key or .p12/.pfx file
Password string
// CAFile is the path to a CA certificate file to verify server
CAFile string
}
Config holds TLS configuration options
Click to show internal directories.
Click to hide internal directories.