[PR #464] Added an expiry date flag (-expires) allowing to set an expiry date to the generated certificate #467

Open
opened 2026-02-25 22:33:35 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/FiloSottile/mkcert/pull/464
Author: @ccaffy
Created: 9/1/2022
Status: 🔄 Open

Base: masterHead: add_configurable_expiration_date_certificates


📝 Commits (1)

  • 4934a79 Added an expiry date flag (-expires) allowing to set an expiry date to the generated certificate

📊 Changes

2 files changed (+25 additions, -5 deletions)

View changed files

📝 cert.go (+6 -4)
📝 main.go (+19 -1)

📄 Description

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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/FiloSottile/mkcert/pull/464 **Author:** [@ccaffy](https://github.com/ccaffy) **Created:** 9/1/2022 **Status:** 🔄 Open **Base:** `master` ← **Head:** `add_configurable_expiration_date_certificates` --- ### 📝 Commits (1) - [`4934a79`](https://github.com/FiloSottile/mkcert/commit/4934a79bf3fa084bbd5fdc640fa5a96f31df9309) Added an expiry date flag (-expires) allowing to set an expiry date to the generated certificate ### 📊 Changes **2 files changed** (+25 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `cert.go` (+6 -4) 📝 `main.go` (+19 -1) </details> ### 📄 Description 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/mkcert#467
No description provided.