From bda1c005fe8d2526c058c2a84ffc5b56be80f8bd Mon Sep 17 00:00:00 2001 From: Areg Harutyunyan Date: Mon, 27 Aug 2018 13:53:08 -0500 Subject: [PATCH] TUN-833: Don't log system root certificate loading failure on Windows --- tlsconfig/tlsconfig.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tlsconfig/tlsconfig.go b/tlsconfig/tlsconfig.go index c2e3b46a..cb0cbe98 100644 --- a/tlsconfig/tlsconfig.go +++ b/tlsconfig/tlsconfig.go @@ -11,6 +11,7 @@ import ( "github.com/cloudflare/cloudflared/log" "github.com/pkg/errors" "gopkg.in/urfave/cli.v2" + "runtime" ) var logger = log.CreateLogger() @@ -84,7 +85,9 @@ func LoadGlobalCertPool() (*x509.CertPool, error) { // First, obtain the system certificate pool certPool, systemCertPoolErr := x509.SystemCertPool() if systemCertPoolErr != nil { - logger.Warnf("error obtaining the system certificates: %s", systemCertPoolErr) + if runtime.GOOS != "windows" { + logger.Warnf("error obtaining the system certificates: %s", systemCertPoolErr) + } certPool = x509.NewCertPool() } else { success = true