瀏覽代碼

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.
Brandon Philips 13 年之前
父節點
當前提交
466229cf4d
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      etcd.go

+ 3 - 3
etcd.go

@@ -479,10 +479,10 @@ func tlsConfigFromInfo(info TLSInfo) (t TLSConfig, ok bool) {
 	}
 	}
 
 
 	t.Scheme = "https"
 	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
 	return t, true
 }
 }