forked from TrueCloudLab/certificates
Close the key manager before shutting down.
This commit is contained in:
parent
029483463b
commit
c02fe77998
1 changed files with 4 additions and 0 deletions
|
@ -6,6 +6,7 @@ import (
|
||||||
"crypto/sha256"
|
"crypto/sha256"
|
||||||
"crypto/x509"
|
"crypto/x509"
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
|
"log"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
@ -327,5 +328,8 @@ func (a *Authority) GetDatabase() db.AuthDB {
|
||||||
|
|
||||||
// Shutdown safely shuts down any clients, databases, etc. held by the Authority.
|
// Shutdown safely shuts down any clients, databases, etc. held by the Authority.
|
||||||
func (a *Authority) Shutdown() error {
|
func (a *Authority) Shutdown() error {
|
||||||
|
if err := a.keyManager.Close(); err != nil {
|
||||||
|
log.Printf("error closing the key manager: %v", err)
|
||||||
|
}
|
||||||
return a.db.Shutdown()
|
return a.db.Shutdown()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue