From 05cc1437b78cbb9f7f78f00864eab8dbc5901524 Mon Sep 17 00:00:00 2001 From: Mariano Cano Date: Thu, 13 Feb 2020 17:48:43 -0800 Subject: [PATCH] Remove unnecessary parse of certificate. --- authority/tls.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/authority/tls.go b/authority/tls.go index 18c0b524..4480314c 100644 --- a/authority/tls.go +++ b/authority/tls.go @@ -193,11 +193,6 @@ func (a *Authority) Renew(oldCert *x509.Certificate) ([]*x509.Certificate, error return nil, errs.Wrap(http.StatusInternalServerError, err, "authority.Renew; error parsing new server certificate", opts...) } - caCert, err := x509.ParseCertificate(a.x509Issuer.Raw) - if err != nil { - return nil, errs.Wrap(http.StatusInternalServerError, err, - "authority.Renew; error parsing intermediate certificate", opts...) - } if err = a.db.StoreCertificate(serverCert); err != nil { if err != db.ErrNotImplemented { @@ -205,7 +200,7 @@ func (a *Authority) Renew(oldCert *x509.Certificate) ([]*x509.Certificate, error } } - return []*x509.Certificate{serverCert, caCert}, nil + return []*x509.Certificate{serverCert, a.x509Issuer}, nil } // RevokeOptions are the options for the Revoke API.