From 26200929c16d6fc831d8a39843b581fbb7e774e3 Mon Sep 17 00:00:00 2001 From: Frank Schroeder Date: Thu, 25 May 2017 00:06:38 +0200 Subject: [PATCH] agent: start HTTPS only if there is a cert and key --- command/agent/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/agent/config.go b/command/agent/config.go index 981ad35314..3f8017e121 100644 --- a/command/agent/config.go +++ b/command/agent/config.go @@ -815,7 +815,7 @@ func (c *Config) HTTPAddrs() ([]ProtoAddr, error) { } addrs = append(addrs, ProtoAddr{"http", a.Network(), a.String()}) } - if c.Ports.HTTPS > 0 { + if c.Ports.HTTPS > 0 && c.CertFile != "" && c.KeyFile != "" { a, err := c.ClientListener(c.Addresses.HTTPS, c.Ports.HTTPS) if err != nil { return nil, err