Merge pull request #73 from smallstep/reload

Update CA properties on reload.
This commit is contained in:
Mariano Cano 2019-05-06 10:56:36 -10:00 committed by GitHub
commit d9da202c7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -189,6 +189,15 @@ func (ca *CA) Reload() error {
logContinue("Reload failed because server could not be replaced.") logContinue("Reload failed because server could not be replaced.")
return errors.Wrap(err, "error reloading server") return errors.Wrap(err, "error reloading server")
} }
// 1. Stop previous renewer
// 2. Replace ca properties
// Do not replace ca.srv
ca.renewer.Stop()
ca.auth = newCA.auth
ca.config = newCA.config
ca.opts = newCA.opts
ca.renewer = newCA.renewer
return nil return nil
} }