Skip to content

Conversation

@lanshubo
Copy link

Currently, the UnixTime struct can only support timestamps up to i64::MAX due to its reliance on SystemTime for time comparison. If a cert's valid_before is set to all-1s (indicating the certificate has no end expiry date), decofing cert will fail.

With this update, when converting from SystemTime, any timestamp greater than i64::MAX will be clamped to i64::MAX. Meanwhile, the internal u64 field in UnixTime continues to store the accurate timestamp value.

This approach is acceptable and does not affect the original logic, since SystemTime is used solely for time comparison purposes.

@lanshubo lanshubo requested a review from rolandjitsu February 11, 2026 08:53
@lanshubo lanshubo self-assigned this Feb 11, 2026
@lanshubo lanshubo changed the title feat: update UnixTime struct to support U64::Max timestamps Update UnixTime struct to support U64::Max timestamps Feb 11, 2026
@lanshubo lanshubo force-pushed the feat/fix-time-limit branch from 4a66ff5 to 1711579 Compare February 11, 2026 09:13
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

Successfully merging this pull request may close these issues.

1 participant