Split Unseal into Unseal and unsealInternal
This commit is contained in:
parent
9e5d1eaac9
commit
681e36c4af
|
@ -817,6 +817,10 @@ func (c *Core) Unseal(key []byte) (bool, error) {
|
|||
}
|
||||
defer memzero(masterKey)
|
||||
|
||||
return c.unsealInternal(masterKey)
|
||||
}
|
||||
|
||||
func (c *Core) unsealInternal(masterKey []byte) (bool, error) {
|
||||
// Attempt to unlock
|
||||
if err := c.barrier.Unseal(masterKey); err != nil {
|
||||
return false, err
|
||||
|
|
Loading…
Reference in New Issue