MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / is_cert_valid

Method is_cert_valid

dstack-util/src/system_setup.rs:397–404  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

395 }
396
397 fn is_cert_valid(&self) -> bool {
398 let now = std::time::SystemTime::now()
399 .duration_since(std::time::UNIX_EPOCH)
400 .map(|d| d.as_secs())
401 .unwrap_or(0);
402 // Valid if at least 10 minutes remaining
403 now + 600 < self.cert_not_after
404 }
405}
406
407struct GatewayContext<'a> {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected