From 1404cf9fd586ff829dbdd1cd0ae1953a7ae8c1d1 Mon Sep 17 00:00:00 2001 From: Alessio Caiazza <acaiazza@gitlab.com> Date: Fri, 30 Mar 2018 18:13:17 +0200 Subject: [PATCH] x509.SystemCertPool() isn't available on windows --- network/client.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/network/client.go b/network/client.go index 6fbae41c2..0b5d26646 100644 --- a/network/client.go +++ b/network/client.go @@ -17,6 +17,7 @@ import ( "net/url" "os" "path/filepath" + "runtime" "strings" "sync" "time" @@ -107,8 +108,9 @@ func (n *client) addTLSCA(tlsConfig *tls.Config) { data, err := ioutil.ReadFile(file) if err == nil { + // x509.SystemCertPool() isn't available on windows pool, err := x509.SystemCertPool() - if err != nil { + if err != nil && runtime.GOOS != "windows" { logrus.Warningln("Failed to load system CertPool:", err) } if pool == nil { -- GitLab