aarnaud / vault-pki-exporter

Provides information about X509 certificate on HashiCorp Vault for Prometheus and InfluxDB
9 stars 12 forks source link

avoid segfault when refreshing PKI certs #21

Closed nickmhankins closed 10 months ago

nickmhankins commented 11 months ago

This prevents a segfault when pki.vault.Logical().Read returns with no data

INFO[0000] mtls/test-intermediate/ loaded
INFO[0000] Refresh PKI certificate for mtls/test-intermediate/
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x16e7034]
aarnaud commented 10 months ago

Thanks