forked from TrueCloudLab/certificates
Merge pull request #73 from smallstep/reload
Update CA properties on reload.
This commit is contained in:
commit
d9da202c7e
1 changed files with 9 additions and 0 deletions
9
ca/ca.go
9
ca/ca.go
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue