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
commit 1f61a925c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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 {