diff --git a/x509-cert/Cargo.toml b/x509-cert/Cargo.toml index 499b35410..47cabb232 100644 --- a/x509-cert/Cargo.toml +++ b/x509-cert/Cargo.toml @@ -16,7 +16,7 @@ rust-version = "1.65" [dependencies] const-oid = { version = "0.9.2", features = ["db"] } # TODO: path = "../const-oid" -der = { version = "0.7.4", features = ["alloc", "derive", "flagset", "oid"] } +der = { version = "0.7.5", features = ["alloc", "derive", "flagset", "oid"] } spki = { version = "0.7.1", features = ["alloc"] } # optional dependencies diff --git a/x509-cert/src/time.rs b/x509-cert/src/time.rs index 5948a7976..8c7837031 100644 --- a/x509-cert/src/time.rs +++ b/x509-cert/src/time.rs @@ -34,6 +34,10 @@ pub enum Time { } impl Time { + /// Time used for Certificate who do not expire. + pub const INFINITY: Time = + Time::GeneralTime(GeneralizedTime::from_date_time(DateTime::INFINITY)); + /// Get duration since `UNIX_EPOCH`. pub fn to_unix_duration(self) -> Duration { match self {