mkcert
mkcert copied to clipboard
Added an expiry date flag (-expires) allowing to set an expiry date to the generated certificate
Hi Filippo,
I had to test that a "homemade" HTTP server automatically reloads the server certificate without the need to restart it.
In order to do that, I used your very nice tool to generate a certificate. As I wanted to test the certificate renewal, I needed to first generate a certificate that is expired, start my HTTP server, try a transfer, see it failing (curl: (60) Peer's Certificate has expired.), then re-generate a new certificate that will expire later, re-issue the transfer and see it succeeding.
I therefore forked your project and modified to allow me to set a specific expiry date for the certificate to generate. I propose that pull request as a contribution if you believe this is a nice functionality you would like to port in the official version of your tool.
I never programmed in Go before, so please forgive me if you spot ugly things :D
Cheers, Cedric
+1 for this @FiloSottile (and thanks @ccaffy) - I started using mkcert today and this is the first feature I came looking for. I'd like to set the expiry +10 years in the future so us lazy devs never have to regenerate for localhost development
Can I set a 100-year expiry time?
@lhuanyun the code in this MR let's you set any date you want, so yes
the code in this MR let's you set any date you want, so yes
This is good news,thx
in
How do I write an expiration time? Can you give me an example?
@lhuanyun This pull request isn't merged yet, so isn't yet part of mkcert. We're hoping @FiloSottile will have time to take a look soon.
When it's merged, and a new release of mkcert is created, you'll be able to specify an expiration time with a command line flag like -expires Mon Jan 2 15:04:05 2006
@lhuanyun This pull request isn't merged yet, so isn't yet part of
mkcert. We're hoping @FiloSottile will have time to take a look soon.When it's merged, and a new release of mkcert is created, you'll be able to specify an expiration time with a command line flag like
-expires Mon Jan 2 15:04:05 2006
thx for you help 。 goodman
Could this finally be merged? One year of maturing should be, hopefully, enough.