Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

step ca renew in offline mode should not require --ca-url and --root flags. #629

Closed
wants to merge 3 commits into from

Conversation

henschkowski
Copy link
Contributor

@henschkowski henschkowski commented Feb 9, 2022

Fixes #627.

I'm new to Go - this is my attempt to fix the issue.

💔Thank you!

@CLAassistant
Copy link

CLAassistant commented Feb 9, 2022

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ henschkowski
❌ Ralf Henschkowski


Ralf Henschkowski seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions github-actions bot added the needs triage Waiting for discussion / prioritization by team label Feb 9, 2022
@dopey dopey changed the title Fix https://github.com/smallstep/cli/issues/627 step ca renew in offline mode should not require --ca-url and --root flags. Feb 9, 2022
@dopey
Copy link
Contributor

dopey commented Feb 9, 2022

@henschkowski, thanks for the PR! Would you mind signing our CLA please?

@henschkowski
Copy link
Contributor Author

henschkowski commented Feb 9, 2022 via email

Copy link
Collaborator

@maraino maraino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @henschkowski, thanks for the PR, but can you change the condition.

@@ -445,7 +445,8 @@ func ParseTemplateData(ctx *cli.Context) (json.RawMessage, error) {
// - Error if the URL scheme is not implicitly or explicitly 'https'.
func ParseCaURL(ctx *cli.Context) (string, error) {
caURL := ctx.String("ca-url")
if caURL == "" {
if caURL == "" &&
!ctx.IsSet("offline") {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would use !ctx.Bool("offline") because --offline=false is a valid option too.

@dopey
Copy link
Contributor

dopey commented Feb 10, 2022

Pulled this into another PR to fix the conflict which is from something else we recently merged.

@dopey dopey closed this Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Waiting for discussion / prioritization by team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Offline "step ca renew" insists on --ca-url and --root parameters
4 participants