Fix panic if cacheDuration is not set

This commit is contained in:
Mariano Cano 2022-09-14 11:16:47 -07:00
parent 924082bb49
commit 4a4f7ca9ba

View file

@ -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