mirror of
https://github.com/FiloSottile/mkcert.git
synced 2026-04-25 05:26:03 +03:00
[GH-ISSUE #343] Expiration #225
Labels
No labels
TLS stack issue
Windows
bug
duplicate
duplicate
enhancement
help wanted
help wanted
pull-request
question
question
root store
waiting for info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/mkcert#225
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @lollita on GitHub (Feb 21, 2021).
Original GitHub issue: https://github.com/FiloSottile/mkcert/issues/343
Do it is possible to set custom expiration date?
@ikeyan commented on GitHub (Feb 26, 2021):
github.com/FiloSottile/mkcert@0a3190b165/cert.go (L59-L62)expiration period is hardcoded here, and the comment tells the reason of the value.
@ikeyan commented on GitHub (Feb 26, 2021):
if this is a feature request, maybe duplicate of https://github.com/FiloSottile/mkcert/issues/339.
@andykais commented on GitHub (May 24, 2021):
maybe expose this as an option and if a user exceeds the macos maximum expiration date, log a warning? Also, I'll be honest I am new to certificates, but I think that a cert generated on linux or windows is not valid on mac, and vice versa because it is tied to a root cert that is specific to that OS. So if we detect what OS the cert is being generated for, we could avoid even logging that error for non-macs.
The big use case for me is distributing a localhost web app as a linux package. The certificate doesn't ever need to expire in that case, and it would be frustrating for users to see an error in their app that their cert expired 2 years later
@prasanthbazz commented on GitHub (Jul 31, 2021):
@andykais Certificates are platform/ OS neutral AFAIK. It is the way we install certificate to the OS certificate store differ between OS.
@rubencodes commented on GitHub (Mar 14, 2022):
Follow-up question on this - is there any way to detect an expired certificate? So I can create + trust a new one?
@ronaaron commented on GitHub (Aug 10, 2025):
I would definitely appreciate an option to set the certificate expiration in number of days. Thank you!
@ed2050 commented on GitHub (Nov 25, 2025):
Actually that link only mentions server certificate expiry:
"TLS server certificates must have a validity period of 825 days or fewer (as expressed in the NotBefore and NotAfter fields of the certificate)."
There's nothing about custom roots. Where did you get that info from?
@ed2050 commented on GitHub (Nov 25, 2025):
Did you ever solve this? I'm in similar situation. 2 years is far too short for local root CA.
@redoper1 commented on GitHub (Dec 1, 2025):
Yeah, it's hardcoded, but it would be great if we could set shorter expire date in days for testing purposes by some flag. Default could be as it is.