X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=util%2Fdependencies.lua;h=9371521caeca1817320af115c5d2160639b05ec2;hb=a945a9ec098199a40e175e351309952950728523;hp=72a7cafe26b1614b64fa1c4ecc4fd53451f9588f;hpb=ddc192e47a756b0cb5d5645e05621ced6b938d90;p=prosody.git diff --git a/util/dependencies.lua b/util/dependencies.lua index 72a7cafe..9371521c 100644 --- a/util/dependencies.lua +++ b/util/dependencies.lua @@ -1,6 +1,6 @@ -- Prosody IM --- Copyright (C) 2008-2009 Matthew Wild --- Copyright (C) 2008-2009 Waqas Hussain +-- Copyright (C) 2008-2010 Matthew Wild +-- Copyright (C) 2008-2010 Waqas Hussain -- -- This project is MIT/X11 licensed. Please see the -- COPYING file in the source package for more information. @@ -73,20 +73,11 @@ function check_dependencies() local ssl = softreq "ssl" if not ssl then - if config.get("*", "core", "run_without_ssl") then - log("warn", "Running without SSL support because run_without_ssl is defined in the config"); - else - missingdep("LuaSec", { - ["Debian/Ubuntu"] = "http://prosody.im/download/start#debian_and_ubuntu"; - ["luarocks"] = "luarocks install luasec"; - ["Source"] = "http://www.inf.puc-rio.br/~brunoos/luasec/"; - }, "SSL/TLS support will not be available"); - end - else - local major, minor, veryminor, patched = ssl._VERSION:match("(%d+)%.(%d+)%.?(%d*)(M?)"); - if not major or ((tonumber(major) == 0 and (tonumber(minor) or 0) <= 3 and (tonumber(veryminor) or 0) <= 2) and patched ~= "M") then - log("error", "This version of LuaSec contains a known bug that causes disconnects, see http://prosody.im/doc/depends"); - end + missingdep("LuaSec", { + ["Debian/Ubuntu"] = "http://prosody.im/download/start#debian_and_ubuntu"; + ["luarocks"] = "luarocks install luasec"; + ["Source"] = "http://www.inf.puc-rio.br/~brunoos/luasec/"; + }, "SSL/TLS support will not be available"); end local encodings, err = softreq "util.encodings" @@ -125,5 +116,13 @@ function check_dependencies() return not fatal; end +function log_warnings() + if ssl then + local major, minor, veryminor, patched = ssl._VERSION:match("(%d+)%.(%d+)%.?(%d*)(M?)"); + if not major or ((tonumber(major) == 0 and (tonumber(minor) or 0) <= 3 and (tonumber(veryminor) or 0) <= 2) and patched ~= "M") then + log("error", "This version of LuaSec contains a known bug that causes disconnects, see http://prosody.im/doc/depends"); + end + end +end return _M;