Revert "Expose the function to generate tls.Config"

This reverts commit bd0918f29a.

Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
This commit is contained in:
Goutham Veeramachaneni 2020-04-17 13:35:16 +01:00 committed by Goutham Veeramachaneni
parent fa4edd700e
commit 7ef21b8bba
No known key found for this signature in database
GPG Key ID: F1C217E8E9023CAD
1 changed files with 2 additions and 3 deletions

View File

@ -45,11 +45,10 @@ func getTLSConfig(configPath string) (*tls.Config, error) {
if err != nil {
return nil, err
}
return ConfigToTLSConfig(&c.TLSConfig)
return configToTLSConfig(&c.TLSConfig)
}
// ConfigToTLSConfig generates the golang tls.Config from the TLSStruct config.
func ConfigToTLSConfig(c *TLSStruct) (*tls.Config, error) {
func configToTLSConfig(c *TLSStruct) (*tls.Config, error) {
cfg := &tls.Config{}
if len(c.TLSCertPath) == 0 {
return nil, errors.New("missing TLSCertPath")