From c384aeca79c69e88055b135a3a926d6107eb946d Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Wed, 2 Apr 2025 16:13:55 +0100 Subject: portmanager: Use alternate host (if any) for SNI (many thanks Zaak!) This was an oversight in the fix for #1915 in commit 4ea7bd7325be (though it seems commit 7e9ebdc75ce4 was the first to introduce this bug). --- core/portmanager.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/portmanager.lua b/core/portmanager.lua index 88bd7b61..e1dde176 100644 --- a/core/portmanager.lua +++ b/core/portmanager.lua @@ -258,7 +258,7 @@ local function add_sni_host(host, service) log("error", "Error creating TLS context for SNI host %s: %s", host, err); else local ok, err = active_service.server:sslctx():set_sni_host( - host, + alternate_host or host, cfg.certificate, cfg.key ); -- cgit v1.2.3