# HG changeset patch # User Matthew Wild # Date 1266077323 0 # Node ID 04958fb28c448e89b42f7bb8d05975411c522ddf # Parent ce5b5d7f87c3eafbd5e3a5751e328df766036b67 certmanager, hostmanager: Rename get_context() to create_context() to be more explicit about what it does diff -r ce5b5d7f87c3 -r 04958fb28c44 core/certmanager.lua --- a/core/certmanager.lua Sat Feb 13 15:34:33 2010 +0000 +++ b/core/certmanager.lua Sat Feb 13 16:08:43 2010 +0000 @@ -18,7 +18,7 @@ -- Global SSL options if not overridden per-host local default_ssl_config = configmanager.get("*", "core", "ssl"); -function get_context(host, mode, config) +function create_context(host, mode, config) local ssl_config = config and config.core.ssl or default_ssl_config; if ssl and ssl_config then return ssl_newcontext(setmetatable(ssl_config, mode == "client" and default_ssl_ctx_mt or default_ssl_ctx_in_mt)); diff -r ce5b5d7f87c3 -r 04958fb28c44 core/hostmanager.lua --- a/core/hostmanager.lua Sat Feb 13 15:34:33 2010 +0000 +++ b/core/hostmanager.lua Sat Feb 13 16:08:43 2010 +0000 @@ -65,8 +65,8 @@ end end - hosts[host].ssl_ctx = certmanager.get_context(host, "client", host_config); -- for outgoing connections - hosts[host].ssl_ctx_in = certmanager.get_context(host, "server", host_config); -- for incoming connections + hosts[host].ssl_ctx = certmanager.create_context(host, "client", host_config); -- for outgoing connections + hosts[host].ssl_ctx_in = certmanager.create_context(host, "server", host_config); -- for incoming connections log((hosts_loaded_once and "info") or "debug", "Activated host: %s", host); eventmanager.fire_event("host-activated", host, host_config);