Skip to content

Commit a0b6ba9

Browse files
committed
TUN-6779: cloudflared should also use the root CAs from system pool to validate edge certificate
1 parent de00396 commit a0b6ba9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tlsconfig/certreloader.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,10 @@ func CreateTunnelConfig(c *cli.Context, serverName string) (*tls.Config, error)
131131
}
132132

133133
if tlsConfig.RootCAs == nil {
134-
rootCAPool := x509.NewCertPool()
134+
rootCAPool, err := x509.SystemCertPool()
135+
if err != nil {
136+
return nil, errors.Wrap(err, "unable to get x509 system cert pool")
137+
}
135138
cfRootCA, err := GetCloudflareRootCA()
136139
if err != nil {
137140
return nil, errors.Wrap(err, "could not append Cloudflare Root CAs to cloudflared certificate pool")

0 commit comments

Comments
 (0)