Documentation ¶
Index ¶
- func CertSetup() (serverTLSConf *tls.Config, clientTLSConf *tls.Config, ...)
- func CreateTLSConfig(caCert, cert, key string) (*tls.Config, error)
- func CreateTLSServerConfig(useClientAuth bool, caCert string) (*tls.Config, error)
- func GetCACertPoolFromFile(pemFile string) (*x509.CertPool, error)
- func GetCertPoolFromDir(path string) (*x509.CertPool, error)
- func NewCoreTLSConfig() *tls.Config
- func ParseCertificate(certFile string) (cert *x509.Certificate, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CertSetup ¶
func CertSetup() (serverTLSConf *tls.Config, clientTLSConf *tls.Config, caBytes, certPEMBytes, keyPEMBytes []byte, err error)
CertSetup
func CreateTLSConfig ¶
CreateTLSConfig creates a tls.config from the CA, cert and client key files
func CreateTLSServerConfig ¶
CreateTLSServerConfig creates a tls.Config f rom the CA certificate
func GetCACertPoolFromFile ¶
GetCACertPoolFromFile - Returns an x509 certificate pool from a specified pem file location
func GetCertPoolFromDir ¶
GetCertPoolFromDir - Returns an x509 certificate pool from the specified directory path
func NewCoreTLSConfig ¶
NewCoreTLSConfig - creates a new TLS config with common basic setup
func ParseCertificate ¶
func ParseCertificate(certFile string) (cert *x509.Certificate, err error)
ParseCertificate read a certificate from a PEM file
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.