Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[X509Utils] generateSelfSignedCertificate: notBefore, days & notAfter #117

Open
jimmyff opened this issue Jan 24, 2025 · 1 comment
Open

Comments

@jimmyff
Copy link

jimmyff commented Jan 24, 2025

I find it very inconsistent to have a notBefore parameter but not a notAfter and then the true notAfter is calculated from the clumsy integer days parameter.

With the current parameters there is no way to have a validity from right now (the time the cert was created) to a clean future date such as: 2026-01-01 00:00:00.

I suggest either removing the 'days' parameter entirely and just having a notAfter parameter. I think this is the best and cleanest solution but it would be a breaking change.

Alternatively you could offer both and adding an assert if both are specified?

If you want to go ahead I'm more than happy to implement and send a PR.

@Ephenodrom
Copy link
Owner

@jimmyff
Feel free to propose a solution for that. Keep in mind the code should be backwards compatible. I took a quick look and would suggest to create a new method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants