From f460c1990e4d0b712942b8daa095fd891ecbf5d8 Mon Sep 17 00:00:00 2001 From: NicoMen Date: Thu, 22 Feb 2018 14:38:04 +0100 Subject: [PATCH] =?UTF-8?q?Starting=20Tr=C3=A6fik=20even=20if=20TLS=20cert?= =?UTF-8?q?ificates=20are=20in=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tls/certificate.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tls/certificate.go b/tls/certificate.go index 16bf776c1..3e0c5727e 100644 --- a/tls/certificate.go +++ b/tls/certificate.go @@ -95,7 +95,8 @@ func (c *Certificates) CreateTLSConfig(entryPointName string) (*tls.Config, map[ for _, certificate := range *c { err := certificate.AppendCertificates(domainsCertificates, entryPointName) if err != nil { - return nil, nil, err + log.Errorf("Unable to add a certificate to the entryPoint %q : %v", entryPointName, err) + continue } for _, certDom := range domainsCertificates { for _, cert := range certDom.Get().(map[string]*tls.Certificate) { @@ -127,16 +128,16 @@ func (c *Certificate) AppendCertificates(certs map[string]*DomainsCertificates, certContent, err := c.CertFile.Read() if err != nil { - return err + return fmt.Errorf("unable to read CertFile : %v", err) } keyContent, err := c.KeyFile.Read() if err != nil { - return err + return fmt.Errorf("uUnable to read KeyFile : %v", err) } tlsCert, err := tls.X509KeyPair(certContent, keyContent) if err != nil { - return err + return fmt.Errorf("unable to generate TLS certificate : %v", err) } parsedCert, _ := x509.ParseCertificate(tlsCert.Certificate[0])