aboutsummaryrefslogtreecommitdiff
path: root/https
diff options
context:
space:
mode:
Diffstat (limited to 'https')
-rw-r--r--https/tls_config.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/https/tls_config.go b/https/tls_config.go
index dd473d8..423c267 100644
--- a/https/tls_config.go
+++ b/https/tls_config.go
@@ -45,10 +45,11 @@ func getTLSConfig(configPath string) (*tls.Config, error) {
45 if err != nil { 45 if err != nil {
46 return nil, err 46 return nil, err
47 } 47 }
48 return configToTLSConfig(&c.TLSConfig) 48 return ConfigToTLSConfig(&c.TLSConfig)
49} 49}
50 50
51func configToTLSConfig(c *TLSStruct) (*tls.Config, error) { 51// ConfigToTLSConfig generates the golang tls.Config from the TLSStruct config.
52func ConfigToTLSConfig(c *TLSStruct) (*tls.Config, error) {
52 cfg := &tls.Config{} 53 cfg := &tls.Config{}
53 if len(c.TLSCertPath) == 0 { 54 if len(c.TLSCertPath) == 0 {
54 return nil, errors.New("missing TLSCertPath") 55 return nil, errors.New("missing TLSCertPath")