internal: failback with self-signed cert if cert for tenant fails to load

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2022-06-20 21:26:34 +02:00
parent d56ddb16b1
commit ece0429ea8
1 changed files with 3 additions and 0 deletions

View File

@ -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
}