1
0
Fork 0

fix for nil clientTLS causing issue

This commit is contained in:
Bruce Lee 2016-08-13 22:05:43 -04:00
parent f0ea45a0f8
commit 0757a75732
2 changed files with 26 additions and 1 deletions

View file

@ -11,6 +11,7 @@ import (
"crypto/x509"
"fmt"
"github.com/BurntSushi/toml"
log "github.com/Sirupsen/logrus"
"github.com/containous/traefik/autogen"
"github.com/containous/traefik/safe"
"github.com/containous/traefik/types"
@ -109,6 +110,10 @@ type ClientTLS struct {
// CreateTLSConfig creates a TLS config from ClientTLS structures
func (clientTLS *ClientTLS) CreateTLSConfig() (*tls.Config, error) {
var err error
if clientTLS == nil {
log.Warnf("clientTLS is nil")
return nil, nil
}
caPool := x509.NewCertPool()
if clientTLS.CA != "" {
var ca []byte