diff options
author | Matthew Wild <mwild1@gmail.com> | 2025-04-03 12:02:45 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2025-04-03 12:02:45 +0100 |
commit | e4fa881601597252684dcc0c4051c4f10691c5a8 (patch) | |
tree | a4456471ba424bf4ddf7b78fde8673f9fdcf5dc7 | |
parent | 3acd17a59eff97d32a1fa75fc8d0876fee7b5e54 (diff) | |
download | prosody-e4fa881601597252684dcc0c4051c4f10691c5a8.tar.gz prosody-e4fa881601597252684dcc0c4051c4f10691c5a8.zip |
portmanager: Take automatic cert selection into account when setting SNI cert
This fixes (another) issue with the fix in 4ea7bd7325be, where it no longer
checked the automatic cert index for an appropriate certificate.
-rw-r--r-- | core/portmanager.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/portmanager.lua b/core/portmanager.lua index e1dde176..2a090398 100644 --- a/core/portmanager.lua +++ b/core/portmanager.lua @@ -253,7 +253,8 @@ local function add_sni_host(host, service) -- TODO should this be some generic thing? e.g. in the service definition alternate_host = config.get(host, "http_host"); end - local ssl, err, cfg = certmanager.create_context(alternate_host or host, "server", prefix_ssl_config, active_service.tls_cfg); + local autocert = certmanager.find_host_cert(alternate_host or host); + local ssl, err, cfg = certmanager.create_context(alternate_host or host, "server", prefix_ssl_config, autocert, active_service.tls_cfg); if not ssl then log("error", "Error creating TLS context for SNI host %s: %s", host, err); else |