diff --git a/der/src/asn1/utc_time.rs b/der/src/asn1/utc_time.rs index 0c10e3aff..9f2f1713b 100644 --- a/der/src/asn1/utc_time.rs +++ b/der/src/asn1/utc_time.rs @@ -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); diff --git a/x509-cert/src/time.rs b/x509-cert/src/time.rs index 8c7837031..c0ef8bf8a 100644 --- a/x509-cert/src/time.rs +++ b/x509-cert/src/time.rs @@ -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),