This commit allows setting the validity bounds on X.509 and SSH certificates using templates.
It also adds the template method toTime, which makes it easier to format a timestamp to RFC3339. This format is compatible with Go's time.Time when json.Unmarshal is used. There are similar methods to do this in the sprig library, but they require you to specify the format string. For example, these methods will return a valid string that can be unmarshaled to time.Time:
Description
This commit allows setting the validity bounds on X.509 and SSH certificates using templates.
It also adds the template method
toTime
, which makes it easier to format a timestamp to RFC3339. This format is compatible with Go'stime.Time
whenjson.Unmarshal
is used. There are similar methods to do this in the sprig library, but they require you to specify the format string. For example, these methods will return a valid string that can be unmarshaled totime.Time
: