Skip to content

[Bug]: step ca renew does not integrate with step-kms-plugin #1314

@andsens

Description

@andsens

Steps to Reproduce

step ca renew --force --out /dev/stdout <(step-kms-plugin certificate --kms tpmkms:storage-directory=$HOME/.step/tpm tpmkms:name=key --bundle) tpmkms:name=key

Your Environment

  • OS - Ubuntu 24.04
  • step CLI Version - Smallstep CLI/0.28.0 (linux/amd64)

Expected Behavior

A new certificate is output to stdout

Actual Behavior

error parsing private key: : no such file or directory

Additional Context

The renew command only works with keys stored in files:

cli/command/ca/renew.go

Lines 646 to 658 in 81a89c1

x509ChainBytes := make([][]byte, len(x509Chain))
for i, c := range x509Chain {
x509ChainBytes[i] = c.Raw
}
opts := []pemutil.Options{pemutil.WithFilename(keyFile)}
if passFile != "" {
opts = append(opts, pemutil.WithPasswordFile(passFile))
}
pk, err := pemutil.Read(keyFile, opts...)
if err != nil {
return tls.Certificate{}, errs.Wrap(err, "error parsing private key")
}

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

Metadata

Metadata

Assignees

Labels

bugneeds triageWaiting for discussion / prioritization by team

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions