Skip to content

Commit

Permalink
Fix a regression introduced in #7698 that breaks root token generation.
Browse files Browse the repository at this point in the history
  • Loading branch information
ncabatoff committed Oct 24, 2019
1 parent 33ff82b commit bc503a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vault/generate_root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit bc503a7

Please sign in to comment.