mirror of
https://github.com/Luzifer/vault-openvpn.git
synced 2024-11-12 18:12:44 +00:00
Fix: Don't panic on non existent PKI path
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
4d62cd0789
commit
3fef524e3d
1 changed files with 4 additions and 0 deletions
4
main.go
4
main.go
|
@ -327,6 +327,10 @@ func fetchValidCertificatesFromVault() ([]*x509.Certificate, error) {
|
||||||
return res, err
|
return res, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if secret == nil {
|
||||||
|
return nil, errors.New("Was not able to read list of certificates")
|
||||||
|
}
|
||||||
|
|
||||||
if secret.Data == nil {
|
if secret.Data == nil {
|
||||||
return res, errors.New("Got no data from backend")
|
return res, errors.New("Got no data from backend")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue