mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #519 from philips/fixup-server-tls-client-config
fix(server): fix client certificate verification
This commit is contained in:
@@ -16,11 +16,15 @@ func NewListener(addr string) (net.Listener, error) {
|
||||
return l, nil
|
||||
}
|
||||
|
||||
func NewTLSListener(addr, certFile, keyFile string) (net.Listener, error) {
|
||||
func NewTLSListener(config *tls.Config, addr, certFile, keyFile string) (net.Listener, error) {
|
||||
if addr == "" {
|
||||
addr = ":https"
|
||||
}
|
||||
config := &tls.Config{}
|
||||
|
||||
if config == nil {
|
||||
config = &tls.Config{}
|
||||
}
|
||||
|
||||
config.NextProtos = []string{"http/1.1"}
|
||||
|
||||
var err error
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
|
||||
// TLSConfig holds the TLS configuration.
|
||||
type TLSConfig struct {
|
||||
Scheme string
|
||||
Server tls.Config
|
||||
Client tls.Config
|
||||
Scheme string // http or https
|
||||
Server tls.Config // Used by the Raft or etcd Server transporter.
|
||||
Client tls.Config // Used by the Raft peer client.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user