Merge pull request #4904 from hashicorp/b-vault-panic

vault: fix panic by checking for nil secret
This commit is contained in:
Michael Schurter
2018-11-20 12:09:35 -06:00
committed by GitHub

View File

@@ -547,6 +547,11 @@ func (v *vaultClient) renew() error {
if err != nil {
return err
}
if secret == nil {
// It's possible for RenewSelf to return (nil, nil) if the
// response body from Vault is empty.
return fmt.Errorf("renewal failed: empty response from vault")
}
auth := secret.Auth
if auth == nil {