mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-02 16:30:17 +02:00
tls: fallback to self-signed certificate (#2760)
* tls: fallback to self-signed certificate * remove unknown domain because certs are no longer valid * update multi-deployment to use service-specific certificates
This commit is contained in:
parent
9b3d574d48
commit
ca48052551
14 changed files with 46 additions and 80 deletions
|
@ -55,10 +55,9 @@ func GetCertificateForDomain(certificates []tls.Certificate, domain string) (*tl
|
|||
}
|
||||
}
|
||||
|
||||
// next use the first cert
|
||||
if len(certificates) > 0 {
|
||||
return &certificates[0], nil
|
||||
}
|
||||
log.Error(context.Background()).
|
||||
Str("domain", domain).
|
||||
Msg("cryptutil: no TLS certificate found for domain, using self-signed certificate")
|
||||
|
||||
// finally fall back to a generated, self-signed certificate
|
||||
return GenerateSelfSignedCertificate(domain)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue