forked from TrueCloudLab/certificates
Remove unnecessary parse of certificate.
This commit is contained in:
parent
cff346e7fd
commit
05cc1437b7
1 changed files with 1 additions and 6 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue