mirror of https://github.com/hashicorp/consul
command/agent: fix up gossip encryption indicator
parent
7a74f559b9
commit
22b2c63304
|
@ -619,6 +619,11 @@ func (c *Command) Run(args []string) int {
|
||||||
}(wp)
|
}(wp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Figure out if gossip is encrypted
|
||||||
|
gossipEncrypted := (config.Server &&
|
||||||
|
c.agent.server.Encrypted() ||
|
||||||
|
c.agent.client.Encrypted())
|
||||||
|
|
||||||
// Let the agent know we've finished registration
|
// Let the agent know we've finished registration
|
||||||
c.agent.StartSync()
|
c.agent.StartSync()
|
||||||
|
|
||||||
|
@ -631,7 +636,7 @@ func (c *Command) Run(args []string) int {
|
||||||
c.Ui.Info(fmt.Sprintf(" Cluster Addr: %v (LAN: %d, WAN: %d)", config.AdvertiseAddr,
|
c.Ui.Info(fmt.Sprintf(" Cluster Addr: %v (LAN: %d, WAN: %d)", config.AdvertiseAddr,
|
||||||
config.Ports.SerfLan, config.Ports.SerfWan))
|
config.Ports.SerfLan, config.Ports.SerfWan))
|
||||||
c.Ui.Info(fmt.Sprintf("Gossip encrypt: %v, RPC-TLS: %v, TLS-Incoming: %v",
|
c.Ui.Info(fmt.Sprintf("Gossip encrypt: %v, RPC-TLS: %v, TLS-Incoming: %v",
|
||||||
c.gossipEncrypted(), config.VerifyOutgoing, config.VerifyIncoming))
|
gossipEncrypted, config.VerifyOutgoing, config.VerifyIncoming))
|
||||||
|
|
||||||
// Enable log streaming
|
// Enable log streaming
|
||||||
c.Ui.Info("")
|
c.Ui.Info("")
|
||||||
|
|
|
@ -211,6 +211,11 @@ func (c *Client) KeyManagerLAN() *serf.KeyManager {
|
||||||
return c.serf.KeyManager()
|
return c.serf.KeyManager()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Encrypted determines if gossip is encrypted
|
||||||
|
func (c *Client) Encrypted() bool {
|
||||||
|
return c.serf.EncryptionEnabled()
|
||||||
|
}
|
||||||
|
|
||||||
// lanEventHandler is used to handle events from the lan Serf cluster
|
// lanEventHandler is used to handle events from the lan Serf cluster
|
||||||
func (c *Client) lanEventHandler() {
|
func (c *Client) lanEventHandler() {
|
||||||
for {
|
for {
|
||||||
|
|
|
@ -561,6 +561,11 @@ func (s *Server) KeyManagerWAN() *serf.KeyManager {
|
||||||
return s.serfWAN.KeyManager()
|
return s.serfWAN.KeyManager()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Encrypted determines if gossip is encrypted
|
||||||
|
func (s *Server) Encrypted() bool {
|
||||||
|
return s.serfLAN.EncryptionEnabled() && s.serfWAN.EncryptionEnabled()
|
||||||
|
}
|
||||||
|
|
||||||
// inmemCodec is used to do an RPC call without going over a network
|
// inmemCodec is used to do an RPC call without going over a network
|
||||||
type inmemCodec struct {
|
type inmemCodec struct {
|
||||||
method string
|
method string
|
||||||
|
|
Loading…
Reference in New Issue