mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-11-03 20:17:59 +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()
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	err = seal.Finalize()
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		c.Ui.Error(fmt.Sprintf("Error finalizing seals: %v", err))
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return 0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user