Ver Fonte

Merge pull request #87 from philips/remove-insecureskipverify

fix(etcd): remove insecureskipverify
Brandon Philips há 12 anos atrás
pai
commit
fb93103d33
1 ficheiros alterados com 3 adições e 1 exclusões
  1. 3 1
      etcd.go

+ 3 - 1
etcd.go

@@ -481,8 +481,10 @@ func tlsConfigFromInfo(info TLSInfo) (t TLSConfig, ok bool) {
 	t.Scheme = "https"
 	t.Server.ClientAuth, t.Server.ClientCAs = newCertPool(CAFile)
 
+	// The client should trust the RootCA that the Server uses since
+	// everyone is a peer in the network.
 	t.Client.Certificates = []tls.Certificate{tlsCert}
-	t.Client.InsecureSkipVerify = true
+	t.Client.RootCAs = t.Server.ClientCAs
 
 	return t, true
 }