1
0
mirror of https://github.com/fumiama/terasu-cloudflared.git synced 2026-06-10 21:24:52 +08:00

TUN-833: Don't log system root certificate loading failure on Windows

This commit is contained in:
Areg Harutyunyan
2018-08-27 13:53:08 -05:00
parent 60ca06d020
commit bda1c005fe

View File

@@ -11,6 +11,7 @@ import (
"github.com/cloudflare/cloudflared/log" "github.com/cloudflare/cloudflared/log"
"github.com/pkg/errors" "github.com/pkg/errors"
"gopkg.in/urfave/cli.v2" "gopkg.in/urfave/cli.v2"
"runtime"
) )
var logger = log.CreateLogger() var logger = log.CreateLogger()
@@ -84,7 +85,9 @@ func LoadGlobalCertPool() (*x509.CertPool, error) {
// First, obtain the system certificate pool // First, obtain the system certificate pool
certPool, systemCertPoolErr := x509.SystemCertPool() certPool, systemCertPoolErr := x509.SystemCertPool()
if systemCertPoolErr != nil { 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() certPool = x509.NewCertPool()
} else { } else {
success = true success = true