diff --git a/httpclient/httpclient.go b/httpclient/httpclient.go index 9b66211e..3ce84729 100644 --- a/httpclient/httpclient.go +++ b/httpclient/httpclient.go @@ -83,6 +83,9 @@ func (c *Config) Initialize(configDir string) error { // loadCACerts returns system cert pools and try to add the configured // CA certificates to it func (c *Config) loadCACerts(configDir string) (*x509.CertPool, error) { + if len(c.CACertificates) == 0 { + return nil, nil + } rootCAs, err := x509.SystemCertPool() if err != nil { rootCAs = x509.NewCertPool()