What version of Go are you using?
1.25.3
What did you expect to see?
Different InvalidReason constants for "expired" vs "not yet valid" certificates,
as these are semantically different conditions.
What did you see instead?
Both conditions use InvalidReason.Expired, which is misleading since "expired"
in English implies something was valid but no longer is, not something that
hasn't become valid yet.
Proposal:
Add a new InvalidReason constant "NotYetValid" to distinguish between:
- Certificates that have expired (after NotAfter)
- Certificates that are not yet valid (before NotBefore)
This would make error handling more precise and the API clearer.
I would be happy to help implement this and to create a pull request
What version of Go are you using?
1.25.3
What did you expect to see?
Different InvalidReason constants for "expired" vs "not yet valid" certificates,
as these are semantically different conditions.
What did you see instead?
Both conditions use InvalidReason.Expired, which is misleading since "expired"
in English implies something was valid but no longer is, not something that
hasn't become valid yet.
Proposal:
Add a new InvalidReason constant "NotYetValid" to distinguish between:
This would make error handling more precise and the API clearer.
I would be happy to help implement this and to create a pull request