Parcourir la source

Start crl generator before setting initOnce

Mariano Cano il y a 4 ans
Parent
commit
812fee7630
1 fichiers modifiés avec 6 ajouts et 6 suppressions
  1. 6 6
      authority/authority.go

+ 6 - 6
authority/authority.go

@@ -716,12 +716,6 @@ func (a *Authority) init() error {
 		a.templates.Data["Step"] = tmplVars
 	}
 
-	// JWT numeric dates are seconds.
-	a.startTime = time.Now().Truncate(time.Second)
-	// Set flag indicating that initialization has been completed, and should
-	// not be repeated.
-	a.initOnce = true
-
 	// Start the CRL generator, we can assume the configuration is validated.
 	if a.config.CRL.IsEnabled() {
 		// Default cache duration to the default one
@@ -734,6 +728,12 @@ func (a *Authority) init() error {
 		}
 	}
 
+	// JWT numeric dates are seconds.
+	a.startTime = time.Now().Truncate(time.Second)
+	// Set flag indicating that initialization has been completed, and should
+	// not be repeated.
+	a.initOnce = true
+
 	return nil
 }