forked from TrueCloudLab/certificates
Store renew certificate in the database.
This commit is contained in:
parent
caa2b8dbb7
commit
de3ba58455
1 changed files with 7 additions and 0 deletions
|
@ -202,6 +202,13 @@ func (a *Authority) Renew(oldCert *x509.Certificate) ([]*x509.Certificate, error
|
||||||
http.StatusInternalServerError, apiCtx{}}
|
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
|
return []*x509.Certificate{serverCert, caCert}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue