Add Finalize method to seal.

This commit is contained in:
Jeff Mitchell
2016-04-14 20:36:20 +00:00
parent 00327a6027
commit 94d6b3ce94
2 changed files with 10 additions and 0 deletions

View File

@@ -381,6 +381,11 @@ func (c *ServerCommand) Run(args []string) int {
listener.Close()
}
err = seal.Finalize()
if err != nil {
c.Ui.Error(fmt.Sprintf("Error finalizing seals: %v", err))
}
return 0
}

View File

@@ -30,6 +30,7 @@ const (
type Seal interface {
SetCore(*Core)
Init() error
Finalize() error
StoredKeysSupported() bool
SetStoredKeys([][]byte) error
@@ -65,6 +66,10 @@ func (d *DefaultSeal) Init() error {
return nil
}
func (d *DefaultSeal) Finalize() error {
return nil
}
func (d *DefaultSeal) StoredKeysSupported() bool {
return false
}