Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions der/src/asn1/utc_time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ use std::time::SystemTime;
/// > interpreted as `19YY`; and
/// > - Where `YY` is less than 50, the year SHALL be interpreted as `20YY`.
///
/// Note: Due to common operations working on `UNIX_EPOCH` [`UtcTime`]s are
/// only supported for the years 1970-2049.
///
/// [1]: https://tools.ietf.org/html/rfc5280#section-4.1.2.5.1
#[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Ord)]
pub struct UtcTime(DateTime);
Expand Down
5 changes: 4 additions & 1 deletion x509-cert/src/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ use std::time::SystemTime;
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
#[derive(Choice, Copy, Clone, Debug, Eq, PartialEq, ValueOrd)]
pub enum Time {
/// Legacy UTC time (has 2-digit year, valid only through 2050).
/// Legacy UTC time (has 2-digit year, valid from 1970 to 2049).
///
/// Note: RFC 5280 specifies 1950-2049, however due to common operations working on
/// `UNIX_EPOCH` this implementation's lower bound is 1970.
#[asn1(type = "UTCTime")]
UtcTime(UtcTime),

Expand Down