forked from TrueCloudLab/certificates
Fix panic if cacheDuration is not set
This commit is contained in:
parent
924082bb49
commit
4a4f7ca9ba
1 changed files with 2 additions and 2 deletions
|
@ -638,8 +638,8 @@ func (a *Authority) init() error {
|
||||||
a.initOnce = true
|
a.initOnce = true
|
||||||
|
|
||||||
// Start the CRL generator
|
// Start the CRL generator
|
||||||
if a.config.CRL != nil {
|
if a.config.CRL != nil && a.config.CRL.Generate {
|
||||||
if a.config.CRL.Generate && a.config.CRL.CacheDuration.Duration > time.Duration(0) {
|
if v := a.config.CRL.CacheDuration; v != nil && v.Duration > 0 {
|
||||||
err := a.startCRLGenerator()
|
err := a.startCRLGenerator()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in a new issue