Comparison

core/portmanager.lua @ 9975:ca01c449357f

Merge 0.11->trunk
author Kim Alvefur <zash@zash.se>
date Wed, 24 Apr 2019 18:06:48 +0200
parent 9849:70e56f126177
parent 9972:240d3f1f7dee
child 10106:c8fbb7f2fc0d
comparison
equal deleted inserted replaced
9974:c30933aa0242 9975:ca01c449357f
111 local ssl, cfg, err; 111 local ssl, cfg, err;
112 -- Create SSL context for this service/port 112 -- Create SSL context for this service/port
113 if service_info.encryption == "ssl" then 113 if service_info.encryption == "ssl" then
114 local global_ssl_config = config.get("*", "ssl") or {}; 114 local global_ssl_config = config.get("*", "ssl") or {};
115 local prefix_ssl_config = config.get("*", config_prefix.."ssl") or global_ssl_config; 115 local prefix_ssl_config = config.get("*", config_prefix.."ssl") or global_ssl_config;
116 log("debug", "Creating context for direct TLS service %s on port %d", service_info.name, port);
116 ssl, err, cfg = certmanager.create_context(service_info.name.." port "..port, "server", 117 ssl, err, cfg = certmanager.create_context(service_info.name.." port "..port, "server",
117 prefix_ssl_config[interface], 118 prefix_ssl_config[interface],
118 prefix_ssl_config[port], 119 prefix_ssl_config[port],
119 prefix_ssl_config, 120 prefix_ssl_config,
120 service_info.ssl_config or {}, 121 service_info.ssl_config or {},
252 log("error", "err = %q", err); 253 log("error", "err = %q", err);
253 end 254 end
254 end 255 end
255 end 256 end
256 end 257 end
257
258 prosody.events.add_handler("item-added/net-provider", function (event) 258 prosody.events.add_handler("item-added/net-provider", function (event)
259 local item = event.item; 259 local item = event.item;
260 register_service(item.name, item); 260 register_service(item.name, item);
261 for host in pairs(prosody.hosts) do 261 for host in pairs(prosody.hosts) do
262 add_sni_host(host, item.name); 262 add_sni_host(host, item.name);