Skip to content
Snippets Groups Projects
Unverified Commit 1404cf9f authored by Alessio Caiazza's avatar Alessio Caiazza
Browse files

x509.SystemCertPool() isn't available on windows

parent 51af6972
Branches caching
No related tags found
No related merge requests found
...@@ -17,6 +17,7 @@ import ( ...@@ -17,6 +17,7 @@ import (
"net/url" "net/url"
"os" "os"
"path/filepath" "path/filepath"
"runtime"
"strings" "strings"
"sync" "sync"
"time" "time"
...@@ -107,8 +108,9 @@ func (n *client) addTLSCA(tlsConfig *tls.Config) { ...@@ -107,8 +108,9 @@ func (n *client) addTLSCA(tlsConfig *tls.Config) {
data, err := ioutil.ReadFile(file) data, err := ioutil.ReadFile(file)
if err == nil { if err == nil {
// x509.SystemCertPool() isn't available on windows
pool, err := x509.SystemCertPool() pool, err := x509.SystemCertPool()
if err != nil { if err != nil && runtime.GOOS != "windows" {
logrus.Warningln("Failed to load system CertPool:", err) logrus.Warningln("Failed to load system CertPool:", err)
} }
if pool == nil { if pool == nil {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment