Diff

plugins/mod_tls.lua @ 6919:ab6c57633ce5

mod_tls: Fix ssl option fallback to a "parent" host if current host does not have ssl options set (thanks 70b1)
author Kim Alvefur <zash@zash.se>
date Mon, 09 Nov 2015 13:40:06 +0100
parent 6918:de35feccc78e
child 7712:0d93dfc2fbfd
line wrap: on
line diff
--- a/plugins/mod_tls.lua	Mon Nov 09 13:39:23 2015 +0100
+++ b/plugins/mod_tls.lua	Mon Nov 09 13:40:06 2015 +0100
@@ -45,11 +45,11 @@
 
 	local global_c2s = rawgetopt("*",     "c2s_ssl") or NULL;
 	local parent_c2s = rawgetopt(parent,  "c2s_ssl") or NULL;
-	local host_c2s   = rawgetopt(modhost, "c2s_ssl") or parent_ssl;
+	local host_c2s   = rawgetopt(modhost, "c2s_ssl") or parent_c2s;
 
 	local global_s2s = rawgetopt("*",     "s2s_ssl") or NULL;
 	local parent_s2s = rawgetopt(parent,  "s2s_ssl") or NULL;
-	local host_s2s   = rawgetopt(modhost, "s2s_ssl") or parent_ssl;
+	local host_s2s   = rawgetopt(modhost, "s2s_ssl") or parent_s2s;
 
 	ssl_ctx_c2s, err, 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); end