From 63730141200a9b45b43709d1d3e4c1337d622d72 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Thu, 20 Jun 2024 13:25:25 +0800 Subject: [PATCH] allow relative paths for root, crt and key in ca.conf --- commands/app.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/commands/app.go b/commands/app.go index 1ccaaf3c8..df633adbc 100644 --- a/commands/app.go +++ b/commands/app.go @@ -183,6 +183,13 @@ func appAction(ctx *cli.Context) error { } } + // allow paths relative to STEPPATH for root, crt and key + for i, root := range cfg.Root { + cfg.Root[i] = step.Abs(root) + } + cfg.IntermediateCert = step.Abs(cfg.IntermediateCert) + cfg.IntermediateKey = step.Abs(cfg.IntermediateKey) + if cfg.AuthorityConfig != nil { if token == "" && strings.EqualFold(cfg.AuthorityConfig.DeploymentType, pki.LinkedDeployment.String()) { return errors.New(`'step-ca' requires the '--token' flag for linked deploy type.