hostmanager: Create a server sslctx for incoming connections

Sat, 17 Oct 2009 16:23:03 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Sat, 17 Oct 2009 16:23:03 +0100
changeset 1980
8fceabd84d74
parent 1979
52ddaa2e6ab8
child 1981
ffbc57a4dea8

hostmanager: Create a server sslctx for incoming connections

core/hostmanager.lua file | annotate | diff | comparison | revisions
--- a/core/hostmanager.lua	Sat Oct 17 16:21:27 2009 +0100
+++ b/core/hostmanager.lua	Sat Oct 17 16:23:03 2009 +0100
@@ -21,6 +21,7 @@
 
 -- These are the defaults if not overridden in the config
 local default_ssl_ctx = { mode = "client", protocol = "sslv23", capath = "/etc/ssl/certs", verify = "none"; };
+local default_ssl_ctx_in = { mode = "server", protocol = "sslv23", capath = "/etc/ssl/certs", verify = "none"; };
 
 local log = require "util.logger".init("hostmanager");
 
@@ -61,6 +62,7 @@
 		local ssl_config = host_config.core.ssl or configmanager.get("*", "core", "ssl");
 		if ssl_config then
         		hosts[host].ssl_ctx = ssl.newcontext(setmetatable(ssl_config, { __index = default_ssl_ctx }));
+        		hosts[host].ssl_ctx_in = ssl.newcontext(setmetatable(ssl_config, { __index = default_ssl_ctx_in }));
         	end
         end
 

mercurial