Skip to content

Commit fb93103

Browse files
committed
Merge pull request #87 from philips/remove-insecureskipverify
fix(etcd): remove insecureskipverify
2 parents 74fb19a + be85442 commit fb93103

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

etcd.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,8 +481,10 @@ func tlsConfigFromInfo(info TLSInfo) (t TLSConfig, ok bool) {
481481
t.Scheme = "https"
482482
t.Server.ClientAuth, t.Server.ClientCAs = newCertPool(CAFile)
483483

484+
// The client should trust the RootCA that the Server uses since
485+
// everyone is a peer in the network.
484486
t.Client.Certificates = []tls.Certificate{tlsCert}
485-
t.Client.InsecureSkipVerify = true
487+
t.Client.RootCAs = t.Server.ClientCAs
486488

487489
return t, true
488490
}

0 commit comments

Comments
 (0)