mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 11:38:02 +00:00
Add Finalize method to seal.
This commit is contained in:
@@ -381,6 +381,11 @@ func (c *ServerCommand) Run(args []string) int {
|
|||||||
listener.Close()
|
listener.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err = seal.Finalize()
|
||||||
|
if err != nil {
|
||||||
|
c.Ui.Error(fmt.Sprintf("Error finalizing seals: %v", err))
|
||||||
|
}
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ const (
|
|||||||
type Seal interface {
|
type Seal interface {
|
||||||
SetCore(*Core)
|
SetCore(*Core)
|
||||||
Init() error
|
Init() error
|
||||||
|
Finalize() error
|
||||||
|
|
||||||
StoredKeysSupported() bool
|
StoredKeysSupported() bool
|
||||||
SetStoredKeys([][]byte) error
|
SetStoredKeys([][]byte) error
|
||||||
@@ -65,6 +66,10 @@ func (d *DefaultSeal) Init() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (d *DefaultSeal) Finalize() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func (d *DefaultSeal) StoredKeysSupported() bool {
|
func (d *DefaultSeal) StoredKeysSupported() bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user