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

Parsing days in timestamp fails in notation cert generate-test -e #129

Closed
nelson-wu opened this issue Nov 12, 2021 · 4 comments
Closed

Parsing days in timestamp fails in notation cert generate-test -e #129

nelson-wu opened this issue Nov 12, 2021 · 4 comments
Milestone

Comments

@nelson-wu
Copy link

$ notation cert generate-test -e 12d
Incorrect Usage: invalid value "12d" for flag -e: parse error

Since the -h page gives --expiry value, -e value certificate expiry (default: 8760h0m0s), I expected it to be able to parse "d" as days. Perhaps clarify the allowed format in the help?

@SteveLasker
Copy link
Contributor

Thanks @nelson-wu. @shizhMSFT, what do you think? Any PRs are welcome to fix

@shizhMSFT
Copy link
Contributor

The expiry value is parsed into time.Duration by the built-in method time.ParseDuration() and it does not support days.

@priteshbandi
Copy link
Contributor

Closed Duplicate issue: #423

    With  the current implementation, we yet don't support `d` (e.g. `30d` ).

Originally posted by @shizhMSFT in #417 (comment)

notation sign command supports an optional expiry flag for user to specify a "best by use" time for the artifact. The duration can be specified in minutes(m) or/and hours(h). The intention of this issue is to support duration in days, for example, 30d, 1d3h20m.

@yizha1 yizha1 modified the milestones: RC-2, Discuss Dec 14, 2022
@yizha1
Copy link
Contributor

yizha1 commented Aug 4, 2023

Close this issue as notation cert generate-test doesn't support --expire flag. Please create a new issue to request this feature if needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

5 participants