fix(tls): fix an issue with TLSConfig ignored when using LDAP StartTLS

pull/1222/head
Anthony Lapenna 2017-09-21 17:19:43 +02:00
parent 1bccd521f8
commit 3fb668474d
1 changed files with 19 additions and 21 deletions

View File

@ -12,7 +12,6 @@ import (
func CreateTLSConfiguration(config *portainer.TLSConfiguration) (*tls.Config, error) {
TLSConfig := &tls.Config{}
if config.TLS {
if config.TLSCertPath != "" && config.TLSKeyPath != "" {
cert, err := tls.LoadX509KeyPair(config.TLSCertPath, config.TLSKeyPath)
if err != nil {
@ -35,7 +34,6 @@ func CreateTLSConfiguration(config *portainer.TLSConfiguration) (*tls.Config, er
}
TLSConfig.InsecureSkipVerify = config.TLSSkipVerify
}
return TLSConfig, nil
}