From 2f48449c47ee3c1e28c585ca3c1484c5b248deb4 Mon Sep 17 00:00:00 2001 From: core Date: Thu, 28 Sep 2023 21:48:22 -0400 Subject: [PATCH] [fix] issue certs that have already been valid for a little bit (1 hour) #4 --- trifid-api/src/codegen/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trifid-api/src/codegen/mod.rs b/trifid-api/src/codegen/mod.rs index 354c10a..79b9f17 100644 --- a/trifid-api/src/codegen/mod.rs +++ b/trifid-api/src/codegen/mod.rs @@ -57,7 +57,7 @@ pub async fn generate_config( .unwrap()], subnets: vec![], groups: vec![format!("role:{}", info.host.role)], - not_before: SystemTime::now(), + not_before: SystemTime::now() - Duration::from_secs(3600), // make certs that have already been valid for an hour. if your system clock is more than an hour behind, it is no longer my problem not_after: SystemTime::now() + Duration::from_secs(CONFIG.crypto.certs_expiry_time), public_key: info.dh_pubkey.clone().try_into().unwrap(), is_ca: false,