Mercurial > prosody-hg
comparison core/portmanager.lua @ 13814:98e68a68c1da 13.0
portmanager: Add debug log message to state which certificate we end up using
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Thu, 03 Apr 2025 12:03:24 +0100 |
| parents | fd7b0adada05 |
| children |
comparison
equal
deleted
inserted
replaced
| 13813:fd7b0adada05 | 13814:98e68a68c1da |
|---|---|
| 256 local autocert = certmanager.find_host_cert(alternate_host or host); | 256 local autocert = certmanager.find_host_cert(alternate_host or host); |
| 257 local ssl, err, cfg = certmanager.create_context(alternate_host or host, "server", prefix_ssl_config, autocert, active_service.tls_cfg); | 257 local ssl, err, cfg = certmanager.create_context(alternate_host or host, "server", prefix_ssl_config, autocert, active_service.tls_cfg); |
| 258 if not ssl then | 258 if not ssl then |
| 259 log("error", "Error creating TLS context for SNI host %s: %s", host, err); | 259 log("error", "Error creating TLS context for SNI host %s: %s", host, err); |
| 260 else | 260 else |
| 261 log("debug", "Using certificate %s for %s (%s) on %s (%s)", cfg.certificate, service or name, name, alternate_host or host, host) | |
| 261 local ok, err = active_service.server:sslctx():set_sni_host( | 262 local ok, err = active_service.server:sslctx():set_sni_host( |
| 262 alternate_host or host, | 263 alternate_host or host, |
| 263 cfg.certificate, | 264 cfg.certificate, |
| 264 cfg.key | 265 cfg.key |
| 265 ); | 266 ); |
