# HG changeset patch # User Matthew Wild # Date 1238439851 -3600 # Node ID 776cb8c847c5ff2f45f750845f3433c80b6a4611 # Parent 0e45234360cd8f7a09c4f79226310160dc4d04d6 Move SSL initialisation into the correct spot (thanks albert) diff -r 0e45234360cd -r 776cb8c847c5 prosody --- a/prosody Sun Mar 29 13:50:59 2009 +0100 +++ b/prosody Mon Mar 30 20:04:11 2009 +0100 @@ -107,9 +107,13 @@ ----------- End of out-of-place code -------------- - eventmanager.fire_event("server-starting"); +local global_ssl_ctx = config.get("*", "core", "ssl"); +if global_ssl_ctx then + local default_ssl_ctx = { mode = "server", protocol = "sslv23", capath = "/etc/ssl/certs", verify = "none"; }; + setmetatable(global_ssl_ctx, { __index = default_ssl_ctx }); +end -- start listening on sockets function net_activate_ports(option, listener, default, conntype) @@ -144,12 +148,6 @@ -- setup error handling setmetatable(_G, { __index = function (t, k) error("Attempt to read a non-existent global '"..k.."'", 2); end, __newindex = function (t, k, v) error("Attempt to set a global: "..tostring(k).." = "..tostring(v), 2); end }); -local global_ssl_ctx = config.get("*", "core", "ssl"); -if global_ssl_ctx then - local default_ssl_ctx = { mode = "server", protocol = "sslv23", capath = "/etc/ssl/certs", verify = "none"; }; - setmetatable(global_ssl_ctx, { __index = default_ssl_ctx }); -end - eventmanager.fire_event("server-started"); local quitting;