notation
notation copied to clipboard
Parsing days in timestamp fails in notation cert generate-test -e
$ 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?
Thanks @nelson-wu. @shizhMSFT, what do you think? Any PRs are welcome to fix
The expiry
value is parsed into time.Duration
by the built-in method time.ParseDuration() and it does not support days.
Closed Duplicate issue: https://github.com/notaryproject/notation/issues/423
With the current implementation, we yet don't support `d` (e.g. `30d` ).
Originally posted by @shizhMSFT in https://github.com/notaryproject/notation/pull/417#discussion_r1009073464
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.
Close this issue as notation cert generate-test
doesn't support --expire
flag. Please create a new issue to request this feature if needed