certificates
certificates copied to clipboard
Add days, weeks and years to duration times
What would you like to be added
Make config options like 'minTLSCertDuration' capable of dealing with 'd' (days), 'w' (weeks) and 'y' (years).
Why this is needed
ATM the only options are minutes or hours, which prompts most people (even in the documentation) to resort to hours in the range of thousands just to get a certificate duration of 90 days (the LetsEncrypt standard). That is just plain unreadable.
Or make that 'D', 'W', 'M' and 'Y', to have months too and not breaking minutes.
At the moment we're these properties are backed by Golang's time.Duration, which does not support anything larger than hours. It would be possible to add other "durations", but might be difficult to support this in a consistent way, as we will need to convert to/from the different durations in that process we will lose the original string unless we store them twice.
Is enhancing the duration module somehow an option then?
https://www.youtube.com/watch?v=hj7LRuusFqo