Skip to content

Commit df0d986

Browse files
authored
chore: Allow certificates with timestamps in the future (#687)
1 parent 6fef5bf commit df0d986

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ic-agent/src/agent/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -949,10 +949,11 @@ impl Agent {
949949
}
950950

951951
fn verify_cert_timestamp(&self, cert: &Certificate) -> Result<(), AgentError> {
952+
// Verify that the certificate is not older than ingress expiry
953+
// Certificates with timestamps in the future are allowed
952954
let time = lookup_time(cert)?;
953955
if (OffsetDateTime::now_utc()
954956
- OffsetDateTime::from_unix_timestamp_nanos(time.into()).unwrap())
955-
.abs()
956957
> self.ingress_expiry
957958
{
958959
Err(AgentError::CertificateOutdated(self.ingress_expiry))

0 commit comments

Comments
 (0)