Skip to content

Commit

Permalink
Merge pull request #21 from nickmhankins/nhankins/fix-crl-segfault
Browse files Browse the repository at this point in the history
avoid segfault when refreshing PKI certs
  • Loading branch information
aarnaud authored Dec 21, 2023
2 parents 878603b + e5d9ae4 commit 4f96e9c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/vault-mon/pki.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@ func (pki *PKI) loadCrl() error {
if err != nil {
return err
}

// avoids a segfault
if secret == nil || secret.Data == nil {
return nil
}

secretCert := vault.SecretCertificate{}
err = mapstructure.Decode(secret.Data, &secretCert)
if err != nil {
Expand Down

0 comments on commit 4f96e9c

Please sign in to comment.