mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
fix(etcd): reverse the cert handling
the server tls config needs the client CA information and the client needs the pub/priv key. This is how this code used to work.
This commit is contained in:
parent
7f9c2eee45
commit
466229cf4d
6
etcd.go
6
etcd.go
@ -479,10 +479,10 @@ func tlsConfigFromInfo(info TLSInfo) (t TLSConfig, ok bool) {
|
||||
}
|
||||
|
||||
t.Scheme = "https"
|
||||
t.Server.Certificates = []tls.Certificate{tlsCert}
|
||||
t.Server.InsecureSkipVerify = true
|
||||
t.Server.ClientAuth, t.Server.ClientCAs = newCertPool(CAFile)
|
||||
|
||||
t.Client.ClientAuth, t.Client.ClientCAs = newCertPool(CAFile)
|
||||
t.Client.Certificates = []tls.Certificate{tlsCert}
|
||||
t.Client.InsecureSkipVerify = true
|
||||
|
||||
return t, true
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user