Skip to content

Commit

Permalink
Switched to assign CAs to correct config property (grpc#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahbron authored and johanbrandhorst committed Sep 15, 2018
1 parent 8621e2d commit f5ad632
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions go/grpcwebproxy/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ func buildBackendTlsOrFail() *tls.Config {
tlsConfig.InsecureSkipVerify = true
} else {
if len(*flagBackendTlsCa) > 0 {
tlsConfig.ClientCAs = x509.NewCertPool()
tlsConfig.RootCAs = x509.NewCertPool()
for _, path := range *flagBackendTlsCa {
data, err := ioutil.ReadFile(path)
if err != nil {
logrus.Fatalf("failed reading backend CA file %v: %v", path, err)
}
if ok := tlsConfig.ClientCAs.AppendCertsFromPEM(data); !ok {
if ok := tlsConfig.RootCAs.AppendCertsFromPEM(data); !ok {
logrus.Fatalf("failed processing backend CA file %v", path)
}
}
Expand Down

0 comments on commit f5ad632

Please sign in to comment.