diff --git a/authority/provisioner/options.go b/authority/provisioner/options.go index 702666a4..cbce43de 100644 --- a/authority/provisioner/options.go +++ b/authority/provisioner/options.go @@ -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), } } diff --git a/authority/provisioner/ssh_options.go b/authority/provisioner/ssh_options.go index 93633a21..e870ff30 100644 --- a/authority/provisioner/ssh_options.go +++ b/authority/provisioner/ssh_options.go @@ -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), } }