diff --git a/pkg/vault-mon/pki.go b/pkg/vault-mon/pki.go index b9d08ea..5e0dd04 100644 --- a/pkg/vault-mon/pki.go +++ b/pkg/vault-mon/pki.go @@ -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 {