TUN-833: Don't log system root certificate loading failure on Windows
This commit is contained in:
parent
60ca06d020
commit
bda1c005fe
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue