Skip to content

Commit

Permalink
embed: use ServerName on TLS DNS discovery without CA file
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthony Romano committed Aug 3, 2016
1 parent acaa920 commit ef218d8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions embed/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@ func (cfg *Config) PeerURLsMapAndToken(which string) (urlsmap types.URLsMap, tok
if err != nil {
return nil, "", err
}
if strings.Contains(clusterStr, "https://") && cfg.PeerTLSInfo.CAFile == "" {
cfg.PeerTLSInfo.ServerName = cfg.DNSCluster
}
urlsmap, err = types.NewURLsMap(clusterStr)
// only etcd member must belong to the discovered cluster.
// proxy does not need to belong to the discovered cluster.
Expand Down

0 comments on commit ef218d8

Please sign in to comment.