Comparison

plugins/mod_tls.lua @ 5378:ec3accda44d3

mod_tls: More use of config sections removed
author Kim Alvefur <zash@zash.se>
date Sat, 23 Mar 2013 02:35:50 +0100
parent 5370:7838acadb0fa
child 5685:f965ac6b7ce1
child 5976:872ff4851c9b
comparison
equal deleted inserted replaced
5377:898454038524 5378:ec3accda44d3
90 session.secure = false; 90 session.secure = false;
91 return true; 91 return true;
92 end); 92 end);
93 93
94 function module.load() 94 function module.load()
95 local ssl_config = config.rawget(module.host, "core", "ssl"); 95 local ssl_config = config.rawget(module.host, "ssl");
96 if not ssl_config then 96 if not ssl_config then
97 local base_host = module.host:match("%.(.*)"); 97 local base_host = module.host:match("%.(.*)");
98 ssl_config = config.get(base_host, "core", "ssl"); 98 ssl_config = config.get(base_host, "ssl");
99 end 99 end
100 host.ssl_ctx = create_context(host.host, "client", ssl_config); -- for outgoing connections 100 host.ssl_ctx = create_context(host.host, "client", ssl_config); -- for outgoing connections
101 host.ssl_ctx_in = create_context(host.host, "server", ssl_config); -- for incoming connections 101 host.ssl_ctx_in = create_context(host.host, "server", ssl_config); -- for incoming connections
102 end 102 end
103 103