mirror of
https://github.com/goauthentik/authentik.git
synced 2026-06-17 19:09:11 +03: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 Co-authored-by: Bapuji Koraganti <34816445+bkoragan@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
cefbf5e6ae
commit
ddfef91ea5
@@ -19,11 +19,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