Skip to content

Commit d3db617

Browse files
Deny certs with timestamps in the future as well as the past (#559)
1 parent 8273d32 commit d3db617

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ic-agent/src/agent/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -878,6 +878,7 @@ impl Agent {
878878
let time = lookup_time(cert)?;
879879
if (OffsetDateTime::now_utc()
880880
- OffsetDateTime::from_unix_timestamp_nanos(time.into()).unwrap())
881+
.abs()
881882
> self.ingress_expiry
882883
{
883884
Err(AgentError::CertificateOutdated(self.ingress_expiry))

0 commit comments

Comments
 (0)