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

TUN-6779: cloudflared should also use the root CAs from system pool to validate edge certificate

This commit is contained in:
João Oliveirinha
2022-09-19 12:34:26 +01:00
parent de00396669
commit a0b6ba9b8d

View File

@@ -131,7 +131,10 @@ func CreateTunnelConfig(c *cli.Context, serverName string) (*tls.Config, error)
}
if tlsConfig.RootCAs == nil {
rootCAPool := x509.NewCertPool()
rootCAPool, err := x509.SystemCertPool()
if err != nil {
return nil, errors.Wrap(err, "unable to get x509 system cert pool")
}
cfRootCA, err := GetCloudflareRootCA()
if err != nil {
return nil, errors.Wrap(err, "could not append Cloudflare Root CAs to cloudflared certificate pool")