From ece0429ea83c7ff3f6e858a0a48e88a90eb25535 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 20 Jun 2022 21:26:34 +0200 Subject: [PATCH] internal: failback with self-signed cert if cert for tenant fails to load Signed-off-by: Jens Langhammer --- internal/web/tenant_tls/tenant_tls.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/web/tenant_tls/tenant_tls.go b/internal/web/tenant_tls/tenant_tls.go index f2212553d..d32f17283 100644 --- a/internal/web/tenant_tls/tenant_tls.go +++ b/internal/web/tenant_tls/tenant_tls.go @@ -78,5 +78,8 @@ func (w *Watcher) GetCertificate(ch *tls.ClientHelloInfo) (*tls.Certificate, err return w.fallback, nil } cert := w.cs.Get(*bestSelection.WebCertificate.Get()) + if cert == nil { + return w.fallback, nil + } return cert, nil }