Skip to content

Commit 7061147

Browse files
committed
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
1 parent 40a2f53 commit 7061147

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

authority/provisioner/options.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66

77
"github.com/pkg/errors"
88

9+
"go.step.sm/cli-utils/step"
910
"go.step.sm/crypto/jose"
1011
"go.step.sm/crypto/x509util"
1112

@@ -160,7 +161,7 @@ func CustomTemplateOptions(o *Options, data x509util.TemplateData, defaultTempla
160161
// Load a template from a file if Template is not defined.
161162
if opts.Template == "" && opts.TemplateFile != "" {
162163
return []x509util.Option{
163-
x509util.WithTemplateFile(opts.TemplateFile, data),
164+
x509util.WithTemplateFile(step.Abs(opts.TemplateFile), data),
164165
}
165166
}
166167

authority/provisioner/ssh_options.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"strings"
66

77
"github.com/pkg/errors"
8+
"go.step.sm/cli-utils/step"
89
"go.step.sm/crypto/sshutil"
910

1011
"github.com/smallstep/certificates/authority/policy"
@@ -144,7 +145,7 @@ func CustomSSHTemplateOptions(o *Options, data sshutil.TemplateData, defaultTemp
144145
// Load a template from a file if Template is not defined.
145146
if opts.Template == "" && opts.TemplateFile != "" {
146147
return []sshutil.Option{
147-
sshutil.WithTemplateFile(opts.TemplateFile, data),
148+
sshutil.WithTemplateFile(step.Abs(opts.TemplateFile), data),
148149
}
149150
}
150151

0 commit comments

Comments
 (0)