From 35239257ffee4dbcb7b0eea96bb18a9a85e4a922 Mon Sep 17 00:00:00 2001 From: Tim Bruijnzeels Date: Wed, 23 Feb 2022 09:36:37 +0100 Subject: [PATCH] Quick hack for the CRL revocation time. Proper fixed planned for 0.10.0. (#788) --- src/commons/api/ca.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/commons/api/ca.rs b/src/commons/api/ca.rs index bec1857c..823c4b28 100644 --- a/src/commons/api/ca.rs +++ b/src/commons/api/ca.rs @@ -773,7 +773,15 @@ pub struct Revocations(Vec); impl Revocations { pub fn to_crl_entries(&self) -> Vec { - self.0.iter().map(|r| CrlEntry::new(r.serial, r.expires)).collect() + // Todo: include the revocation time in ['Revocation'] and use that. + // this will require that we reprocess history to get this + // value. We do know when an object was removed or replaced, + // so we can get it - but it's not entirely trivial. + // + // See issue #788. This issue was added to the 0.10.0 backlog. + // For now we just do a quick hack and use 'now' rather than the + // future dated 'expires' time for the CRL entry. + self.0.iter().map(|r| CrlEntry::new(r.serial, Time::now())).collect() } /// Purges all expired revocations, and returns them.