Update to TrustedCAFile for etcd as CAFile is deprecated and removed in latest libs

This commit is contained in:
Jeff Mitchell 2018-05-22 15:46:39 -04:00
parent 18f23f68a1
commit e55a3c7e9b
2 changed files with 6 additions and 6 deletions

View File

@ -138,9 +138,9 @@ func newEtcdV2Client(conf map[string]string) (client.Client, error) {
if (hasCert && hasKey) || hasCa {
var transportErr error
tls := transport.TLSInfo{
CAFile: ca,
CertFile: cert,
KeyFile: key,
TrustedCAFile: ca,
CertFile: cert,
KeyFile: key,
}
cTransport, transportErr = transport.NewTransport(tls, 30*time.Second)

View File

@ -86,9 +86,9 @@ func newEtcd3Backend(conf map[string]string, logger log.Logger) (physical.Backen
ca, hasCa := conf["tls_ca_file"]
if (hasCert && hasKey) || hasCa {
tls := transport.TLSInfo{
CAFile: ca,
CertFile: cert,
KeyFile: key,
TrustedCAFile: ca,
CertFile: cert,
KeyFile: key,
}
tlscfg, err := tls.ClientConfig()