Fix self-signed cert generation, not_before is required apparently

This commit is contained in:
Brian Picciano 2023-07-31 20:15:29 +02:00
parent 8a530d4f7d
commit d429b51cf8

View File

@ -35,6 +35,12 @@ impl Certificate {
.set_subject_name(&name) .set_subject_name(&name)
.or_unexpected_while("setting subject 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 // 9999/07/23
let not_after = Asn1Time::from_unix(253388296800).expect("initializing not_after"); let not_after = Asn1Time::from_unix(253388296800).expect("initializing not_after");
builder builder