mirror of
https://github.com/hashicorp/vault.git
synced 2026-05-05 20:36:26 +02:00
This commit is contained in:
parent
c3ca83d9af
commit
87207df0df
@ -39,11 +39,11 @@ type GenerateRootStrategy interface {
|
||||
type generateStandardRootToken struct{}
|
||||
|
||||
func (g generateStandardRootToken) authenticate(ctx context.Context, c *Core, combinedKey []byte) error {
|
||||
_, err := c.unsealKeyToMasterKey(ctx, combinedKey)
|
||||
masterKey, err := c.unsealKeyToMasterKey(ctx, combinedKey)
|
||||
if err != nil {
|
||||
return errwrap.Wrapf("unable to authenticate: {{err}}", err)
|
||||
}
|
||||
if err := c.barrier.VerifyMaster(combinedKey); err != nil {
|
||||
if err := c.barrier.VerifyMaster(masterKey); err != nil {
|
||||
return errwrap.Wrapf("master key verification failed: {{err}}", err)
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user