Documentation
¶
Overview ¶
Package tlsutil provides helper functions for TLS configuration
Index ¶
- func DefaultClientConfig(certPath, keyPath, caPath, serverName string) (*tls.Config, error)
- func DefaultServerConfig(certPath, keyPath, caPath string) (*tls.Config, error)
- func LoadCACertPool(caPath string) (*x509.CertPool, error)
- func LoadClientConfig(cfg Config) (*tls.Config, error)
- func LoadServerConfig(cfg Config) (*tls.Config, error)
- func TLSVersionFromString(s string) uint16
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultClientConfig ¶
DefaultClientConfig returns a secure default client TLS config
func DefaultServerConfig ¶
DefaultServerConfig returns a secure default server TLS config
func LoadCACertPool ¶
LoadCACertPool loads a CA certificate pool from a file
func LoadClientConfig ¶
LoadClientConfig loads TLS configuration for clients
func LoadServerConfig ¶
LoadServerConfig loads TLS configuration for servers
func TLSVersionFromString ¶
TLSVersionFromString converts a string to TLS version
Types ¶
Click to show internal directories.
Click to hide internal directories.