From 120629edab3ebd2f642340908cd42a958bde6963 Mon Sep 17 00:00:00 2001 From: max furman Date: Tue, 20 Sep 2022 23:07:16 -0700 Subject: [PATCH] Do not use the templateError in the BadRequestErr --- authority/ssh.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/authority/ssh.go b/authority/ssh.go index dda8a876..55861ce7 100644 --- a/authority/ssh.go +++ b/authority/ssh.go @@ -203,10 +203,10 @@ func (a *Authority) SignSSH(ctx context.Context, key ssh.PublicKey, opts provisi // Create certificate from template. certificate, err := sshutil.NewCertificate(cr, certOptions...) if err != nil { - var templErr *sshutil.TemplateError - if errors.As(err, &templErr) { + var te *sshutil.TemplateError + if errors.As(err, &te) { return nil, errs.ApplyOptions( - errs.BadRequestErr(templErr, templErr.Error()), + errs.BadRequestErr(err, err.Error()), errs.WithKeyVal("signOptions", signOpts), ) }