certificates icon indicating copy to clipboard operation
certificates copied to clipboard

[Bug]: step ca init ignores --context flag when using --pki

Open larsks opened this issue 1 year ago • 0 comments

Steps to Reproduce

With a step context already set:

$ step context list
▶ vault-test

Attempt to initialize a ca in a new context with the --pki flag:

$ step ca init  --pki --deployment-type standalone --name='test ca' \
  --password-file <(echo secret) --context test-ca

This command attempts to overwrite the files in the previously selected context, rather than using the context specified in the --context argument:

Generating root certificate... done!
Generating intermediate certificate... done!
✗ Would you like to overwrite /home/larsks/.step/authorities/vault-test/certs/root_ca.crt [y/n]: █

Your Environment

  • OS - Fedora 38
  • step-ca Version - 0.25.2

Expected Behavior

I expected step ca to generate files in the specified context.

Actual Behavior

It attempted to overwrite files in the current context instead.

Additional Context

No response

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).

larsks avatar Feb 11 '24 01:02 larsks