diff --git a/internal/ejbca/client.go b/internal/ejbca/client.go index c97163a..897cde3 100644 --- a/internal/ejbca/client.go +++ b/internal/ejbca/client.go @@ -183,5 +183,5 @@ func (s *signer) parseEjbcaError(ctx context.Context, detail string, err error) logger.Error(err, "EJBCA returned an error") - return fmt.Errorf(errString) + return errors.New(errString) } diff --git a/internal/est/est.go b/internal/est/est.go index 9e286b6..8c9c83a 100644 --- a/internal/est/est.go +++ b/internal/est/est.go @@ -193,7 +193,7 @@ func (e *client) CaCerts(alias string) ([]*x509.Certificate, error) { if len(content) > 0 { errMsg = fmt.Sprintf("unexpected content-type: %s", content[0]) } - return nil, fmt.Errorf(errMsg) + return nil, errors.New(errMsg) } // Ensure that the response is base64 encoded @@ -203,7 +203,7 @@ func (e *client) CaCerts(alias string) ([]*x509.Certificate, error) { if len(encoding) > 0 { errMsg = fmt.Sprintf("unexpected content-transfer-encoding: %s", encoding[0]) } - return nil, fmt.Errorf(errMsg) + return nil, errors.New(errMsg) } e.logger.Info("Validated HTTP response headers")