Changeset

9975:ca01c449357f

Merge 0.11->trunk
author Kim Alvefur <zash@zash.se>
date Wed, 24 Apr 2019 18:06:48 +0200
parents 9974:c30933aa0242 (current diff) 9973:640a2b8e7806 (diff)
children 9976:0e2f663d0714
files core/portmanager.lua plugins/mod_tls.lua
diffstat 3 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/core/portmanager.lua	Wed Apr 17 10:11:22 2019 -0700
+++ b/core/portmanager.lua	Wed Apr 24 18:06:48 2019 +0200
@@ -113,6 +113,7 @@
 				if service_info.encryption == "ssl" then
 					local global_ssl_config = config.get("*", "ssl") or {};
 					local prefix_ssl_config = config.get("*", config_prefix.."ssl") or global_ssl_config;
+					log("debug", "Creating context for direct TLS service %s on port %d", service_info.name, port);
 					ssl, err, cfg = certmanager.create_context(service_info.name.." port "..port, "server",
 						prefix_ssl_config[interface],
 						prefix_ssl_config[port],
@@ -254,7 +255,6 @@
 		end
 	end
 end
-
 prosody.events.add_handler("item-added/net-provider", function (event)
 	local item = event.item;
 	register_service(item.name, item);
--- a/plugins/mod_tls.lua	Wed Apr 17 10:11:22 2019 -0700
+++ b/plugins/mod_tls.lua	Wed Apr 24 18:06:48 2019 +0200
@@ -53,11 +53,14 @@
 	local parent_s2s = rawgetopt(parent,  "s2s_ssl") or NULL;
 	local host_s2s   = rawgetopt(modhost, "s2s_ssl") or parent_s2s;
 
+	module:log("debug", "Creating context for c2s");
 	local request_client_certs = { verify = { "peer", "client_once", }; };
 
+	module:log("debug", "Creating context for s2sout");
 	ssl_ctx_c2s, err_c2s, ssl_cfg_c2s = create_context(host.host, "server", host_c2s, host_ssl, global_c2s); -- for incoming client connections
 	if not ssl_ctx_c2s then module:log("error", "Error creating context for c2s: %s", err_c2s); end
 
+	module:log("debug", "Creating context for s2sin");
 	-- for outgoing server connections
 	ssl_ctx_s2sout, err_s2sout, ssl_cfg_s2sout = create_context(host.host, "client", host_s2s, host_ssl, global_s2s, request_client_certs);
 	if not ssl_ctx_s2sout then module:log("error", "Error creating contexts for s2sout: %s", err_s2sout); end
--- a/util-src/encodings.c	Wed Apr 17 10:11:22 2019 -0700
+++ b/util-src/encodings.c	Wed Apr 24 18:06:48 2019 +0200
@@ -299,7 +299,7 @@
 		return 1;
 	}
 
-	prepped_len = usprep_prepare(profile, unprepped, unprepped_len, prepped, 1024, 0, NULL, &err);
+	prepped_len = usprep_prepare(profile, unprepped, unprepped_len, prepped, 1024, USPREP_ALLOW_UNASSIGNED, NULL, &err);
 
 	if(U_FAILURE(err)) {
 		lua_pushnil(L);