From d429b51cf8a6ecae8de4552ed4d2271211119279 Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Mon, 31 Jul 2023 20:15:29 +0200 Subject: [PATCH] Fix self-signed cert generation, not_before is required apparently --- src/domain/tls/certificate.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/domain/tls/certificate.rs b/src/domain/tls/certificate.rs index 0eadf0e..0e8ee9a 100644 --- a/src/domain/tls/certificate.rs +++ b/src/domain/tls/certificate.rs @@ -35,6 +35,12 @@ impl Certificate { .set_subject_name(&name) .or_unexpected_while("setting subject name")?; + // 1970/01/01 + let not_before = Asn1Time::from_unix(0).expect("initializing not_before"); + builder + .set_not_before(not_before.as_ref()) + .or_unexpected_while("setting not_before")?; + // 9999/07/23 let not_after = Asn1Time::from_unix(253388296800).expect("initializing not_after"); builder