(&self)
| 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 | |
| 407 | struct GatewayContext<'a> { |
no outgoing calls
no test coverage detected