You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: authority/authority.go
+12-3
Original file line number
Diff line number
Diff line change
@@ -67,7 +67,7 @@ type Authority struct {
67
67
sshCAHostFederatedCerts []ssh.PublicKey
68
68
69
69
// CRL vars
70
-
crlChannelchanint
70
+
crlTicker*time.Ticker
71
71
72
72
// Do not re-initialize
73
73
initOncebool
@@ -604,6 +604,10 @@ func (a *Authority) IsAdminAPIEnabled() bool {
604
604
605
605
// Shutdown safely shuts down any clients, databases, etc. held by the Authority.
606
606
func (a*Authority) Shutdown() error {
607
+
ifa.crlTicker!=nil {
608
+
a.crlTicker.Stop()
609
+
}
610
+
607
611
iferr:=a.keyManager.Close(); err!=nil {
608
612
log.Printf("error closing the key manager: %v", err)
609
613
}
@@ -612,6 +616,11 @@ func (a *Authority) Shutdown() error {
612
616
613
617
// CloseForReload closes internal services, to allow a safe reload.
614
618
func (a*Authority) CloseForReload() {
619
+
620
+
ifa.crlTicker!=nil {
621
+
a.crlTicker.Stop()
622
+
}
623
+
615
624
iferr:=a.keyManager.Close(); err!=nil {
616
625
log.Printf("error closing the key manager: %v", err)
617
626
}
@@ -686,12 +695,12 @@ func (a *Authority) startCRLGenerator() error {
686
695
iftickerDuration<=0 {
687
696
panic(fmt.Sprintf("ERROR: Addition of jitter to CRL generation time %v creates a negative duration (%v). Use a CRL generation time of longer than 1 minute.", a.config.CRL.CacheDuration, tickerDuration))
0 commit comments