mirror of
https://github.com/status-im/consul.git
synced 2025-01-11 06:16:08 +00:00
command/agent: fix up gossip encryption indicator
This commit is contained in:
parent
7a74f559b9
commit
22b2c63304
@ -619,6 +619,11 @@ func (c *Command) Run(args []string) int {
|
||||
}(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
|
||||
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,
|
||||
config.Ports.SerfLan, config.Ports.SerfWan))
|
||||
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
|
||||
c.Ui.Info("")
|
||||
|
@ -211,6 +211,11 @@ func (c *Client) KeyManagerLAN() *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
|
||||
func (c *Client) lanEventHandler() {
|
||||
for {
|
||||
|
@ -561,6 +561,11 @@ func (s *Server) KeyManagerWAN() *serf.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
|
||||
type inmemCodec struct {
|
||||
method string
|
||||
|
Loading…
x
Reference in New Issue
Block a user