mirror of
https://github.com/kemko/nomad.git
synced 2026-01-09 03:45:41 +03:00
set server configuration checksum on reload
This commit is contained in:
@@ -414,6 +414,7 @@ func (c *Client) reloadTLSConnections(newConfig *nconfig.TLSConfig) error {
|
||||
// decide on what type of connections to accept
|
||||
c.configLock.Lock()
|
||||
c.config.TLSConfig = newConfig
|
||||
c.config.TLSConfig.SetChecksum()
|
||||
c.configLock.Unlock()
|
||||
|
||||
c.connPool.ReloadTLS(tlsWrap)
|
||||
|
||||
@@ -471,6 +471,7 @@ func (s *Server) reloadTLSConnections(newTLSConfig *config.TLSConfig) error {
|
||||
// access to config information, such as rpc.go, where we decide on what kind
|
||||
// of network connections to accept depending on the server configuration
|
||||
s.config.TLSConfig = newTLSConfig
|
||||
s.config.TLSConfig.SetChecksum()
|
||||
|
||||
s.rpcTLS = incomingTLS
|
||||
s.connPool.ReloadTLS(tlsWrap)
|
||||
|
||||
@@ -427,6 +427,7 @@ func TestServer_Reload_TLSConnections_PlaintextToTLS_OnlyRPC(t *testing.T) {
|
||||
|
||||
err := s1.reloadTLSConnections(newTLSConfig)
|
||||
assert.Nil(err)
|
||||
assert.True(s1.config.TLSConfig.EnableRPC)
|
||||
assert.True(s1.config.TLSConfig.CertificateInfoIsEqual(newTLSConfig))
|
||||
|
||||
codec := rpcClient(t, s1)
|
||||
|
||||
Reference in New Issue
Block a user