From b595c55f0a6370195bc941f9c3fdd8b4aac202e7 Mon Sep 17 00:00:00 2001 From: Mariano Cano Date: Fri, 3 May 2019 15:40:59 -0700 Subject: [PATCH] Update CA properties on reload. Fixes #71 --- ca/ca.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ca/ca.go b/ca/ca.go index 5ec05981..d14c496d 100644 --- a/ca/ca.go +++ b/ca/ca.go @@ -189,6 +189,15 @@ func (ca *CA) Reload() error { logContinue("Reload failed because server could not be replaced.") 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 }