[PR #513] Add a -days flag to specify the validity period. #478

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

📋 Pull Request Information

Original PR: https://github.com/FiloSottile/mkcert/pull/513
Author: @kixelated
Created: 3/25/2023
Status: 🔄 Open

Base: masterHead: days-flag


📝 Commits (1)

  • 6d3982e Add a -days flag to specify the validity period.

📊 Changes

2 files changed (+9 additions, -2 deletions)

View changed files

📝 cert.go (+2 -2)
📝 main.go (+7 -0)

📄 Description

The hard-coded default of 2 years, 3 months works for most applications. However, some applications enforce that the certificate is only valid for a short period and this default is too long.

For example, WebRTC fingerprinting enforces a max duration of 30 days. WebTransport is even more extreme and rejects certs valid for more than 14 days. These certificates are meant to be ephemeral.

Fixes #339 #343


🔄 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/513 **Author:** [@kixelated](https://github.com/kixelated) **Created:** 3/25/2023 **Status:** 🔄 Open **Base:** `master` ← **Head:** `days-flag` --- ### 📝 Commits (1) - [`6d3982e`](https://github.com/FiloSottile/mkcert/commit/6d3982e24d2b9a792fc2acd02037a31c26f149c4) Add a -days flag to specify the validity period. ### 📊 Changes **2 files changed** (+9 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `cert.go` (+2 -2) 📝 `main.go` (+7 -0) </details> ### 📄 Description The hard-coded default of 2 years, 3 months works for most applications. However, some applications enforce that the certificate is only valid for a short period and this default is too long. For example, WebRTC fingerprinting enforces a max duration of 30 days. WebTransport is even more extreme and rejects certs valid for more than 14 days. These certificates are meant to be ephemeral. Fixes #339 #343 --- <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#478
No description provided.