mirror of
https://github.com/goauthentik/authentik
synced 2026-04-25 17:15:26 +02:00
internal: fix certificate fallback without SNI (#21417)
21412: fix falls back to RSA instead of configured other TLS Certificates for a brand/domain Honor the other certificates other than RSA
This commit is contained in:
@@ -18,11 +18,7 @@ func (ws *WebServer) GetCertificate() func(ch *tls.ClientHelloInfo) (*tls.Config
|
||||
}
|
||||
return func(ch *tls.ClientHelloInfo) (*tls.Config, error) {
|
||||
cfg := utils.GetTLSConfig()
|
||||
if ch.ServerName == "" {
|
||||
cfg.Certificates = []tls.Certificate{fallback}
|
||||
return cfg, nil
|
||||
}
|
||||
if ws.ProxyServer != nil {
|
||||
if ch.ServerName != "" && ws.ProxyServer != nil {
|
||||
appCert := ws.ProxyServer.GetCertificate(ch.ServerName)
|
||||
if appCert != nil {
|
||||
cfg.Certificates = []tls.Certificate{*appCert}
|
||||
|
||||
Reference in New Issue
Block a user