diff options
author | Matthew Wild <mwild1@gmail.com> | 2025-04-03 12:04:19 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2025-04-03 12:04:19 +0100 |
commit | 80d5f64ca0934ea4e3262c9be9c1545e2d0fa273 (patch) | |
tree | bf4f8f4259e77140a452120b5595ec346b505f8c | |
parent | e19a4891fcfcd7d5c3e43c1ac93895a06a316697 (diff) | |
parent | 3905dcae02962457bfa8d426c472944358cfcf20 (diff) | |
download | prosody-80d5f64ca0934ea4e3262c9be9c1545e2d0fa273.tar.gz prosody-80d5f64ca0934ea4e3262c9be9c1545e2d0fa273.zip |
Merge 13.0->trunk
-rw-r--r-- | core/portmanager.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/portmanager.lua b/core/portmanager.lua index e1dde176..3b9b8d67 100644 --- a/core/portmanager.lua +++ b/core/portmanager.lua @@ -253,10 +253,12 @@ 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 + log("debug", "Using certificate %s for %s (%s) on %s (%s)", cfg.certificate, service or name, name, alternate_host or host, host) local ok, err = active_service.server:sslctx():set_sni_host( alternate_host or host, cfg.certificate, |