From 4a4f7ca9ba127e2ffc9abf18036d2265194b7958 Mon Sep 17 00:00:00 2001 From: Mariano Cano Date: Wed, 14 Sep 2022 11:16:47 -0700 Subject: [PATCH] Fix panic if cacheDuration is not set --- authority/authority.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/authority/authority.go b/authority/authority.go index efd7ab66..619482bd 100644 --- a/authority/authority.go +++ b/authority/authority.go @@ -638,8 +638,8 @@ func (a *Authority) init() error { a.initOnce = true // Start the CRL generator - if a.config.CRL != nil { - if a.config.CRL.Generate && a.config.CRL.CacheDuration.Duration > time.Duration(0) { + if a.config.CRL != nil && a.config.CRL.Generate { + if v := a.config.CRL.CacheDuration; v != nil && v.Duration > 0 { err := a.startCRLGenerator() if err != nil { return err