Use step.Abs to load the certificate templates

step.Abs has been removed from crypto and they need to be set when those
methods are used
pull/1493/head
Mariano Cano 10 months ago
parent 40a2f53589
commit 7061147885
No known key found for this signature in database

@ -6,6 +6,7 @@ import (
"github.com/pkg/errors"
"go.step.sm/cli-utils/step"
"go.step.sm/crypto/jose"
"go.step.sm/crypto/x509util"
@ -160,7 +161,7 @@ func CustomTemplateOptions(o *Options, data x509util.TemplateData, defaultTempla
// Load a template from a file if Template is not defined.
if opts.Template == "" && opts.TemplateFile != "" {
return []x509util.Option{
x509util.WithTemplateFile(opts.TemplateFile, data),
x509util.WithTemplateFile(step.Abs(opts.TemplateFile), data),
}
}

@ -5,6 +5,7 @@ import (
"strings"
"github.com/pkg/errors"
"go.step.sm/cli-utils/step"
"go.step.sm/crypto/sshutil"
"github.com/smallstep/certificates/authority/policy"
@ -144,7 +145,7 @@ func CustomSSHTemplateOptions(o *Options, data sshutil.TemplateData, defaultTemp
// Load a template from a file if Template is not defined.
if opts.Template == "" && opts.TemplateFile != "" {
return []sshutil.Option{
sshutil.WithTemplateFile(opts.TemplateFile, data),
sshutil.WithTemplateFile(step.Abs(opts.TemplateFile), data),
}
}

Loading…
Cancel
Save