From de3ba5845545a1f2d42dcc8a4e8e9667bb0d628b Mon Sep 17 00:00:00 2001 From: Mariano Cano Date: Tue, 10 Dec 2019 13:10:45 -0800 Subject: [PATCH] Store renew certificate in the database. --- authority/tls.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/authority/tls.go b/authority/tls.go index 2baa71f0..0dd4f323 100644 --- a/authority/tls.go +++ b/authority/tls.go @@ -202,6 +202,13 @@ func (a *Authority) Renew(oldCert *x509.Certificate) ([]*x509.Certificate, error http.StatusInternalServerError, apiCtx{}} } + if err = a.db.StoreCertificate(serverCert); err != nil { + if err != db.ErrNotImplemented { + return nil, &apiError{errors.Wrap(err, "error storing certificate in db"), + http.StatusInternalServerError, apiCtx{}} + } + } + return []*x509.Certificate{serverCert, caCert}, nil }