Fix a regression introduced in #7698 that breaks root token generation. (#7727)

This commit is contained in:
ncabatoff 2019-10-24 10:23:31 -04:00 committed by GitHub
parent ce2866a29a
commit 7c6cc95a24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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)
}