X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=prosodyctl;h=0a4491bff119a1fb824bfc8496d023e2dd3ebd57;hb=6a1d5440fd36dd208523533717a5b387ca01c1f2;hp=abf9bf95d1392a02f01c3d8f3eeaac616f73bfba;hpb=d7500b793dfcb85934bc5c42213dc6b393b1a2f6;p=prosody.git diff --git a/prosodyctl b/prosodyctl index abf9bf95..0a4491bf 100755 --- a/prosodyctl +++ b/prosodyctl @@ -244,7 +244,7 @@ end local modulemanager = require "core.modulemanager" local prosodyctl = require "util.prosodyctl" -require "socket" +local socket = require "socket" ----------------------- -- FIXME: Duplicate code waiting for util.startup @@ -552,6 +552,7 @@ function commands.about(arg) if not hgid and hgrepo then return path.." - "..hgrepo .."!\n "; end + -- 010452cfaf53 is the first commit in the prosody-modules repository hgrepo = hgrepo == "010452cfaf53" and "prosody-modules"; return path..(hgid and " - "..(hgrepo or "HG").." rev: "..hgid or "") .."\n "; @@ -577,6 +578,8 @@ function commands.about(arg) print(""); print("# Lua module versions"); local module_versions, longest_name = {}, 8; + local luaevent =dependencies.softreq"luaevent"; + local ssl = dependencies.softreq"ssl"; for name, module in pairs(package.loaded) do if type(module) == "table" and rawget(module, "_VERSION") and name ~= "_G" and not name:match("%.") then @@ -838,7 +841,8 @@ function commands.check(arg) }); local known_global_options = set.new({ "pidfile", "log", "plugin_paths", "prosody_user", "prosody_group", "daemonize", - "umask", "prosodyctl_timeout", "use_ipv6", "use_libevent", "network_settings" + "umask", "prosodyctl_timeout", "use_ipv6", "use_libevent", "network_settings", + "network_backend", "http_default_host", }); local config = config.getconfig(); -- Check that we have any global options (caused by putting a host at the top) @@ -1093,7 +1097,7 @@ function commands.check(arg) local x509_verify_identity = require"util.x509".verify_identity; local ssl = dependencies.softreq"ssl"; -- local datetime_parse = require"util.datetime".parse_x509; - local load_cert = ssl and ssl.x509 and ssl.x509.load; + local load_cert = ssl and ssl.loadcertificate; -- or ssl.cert_from_pem if not ssl then print("LuaSec not available, can't perform certificate checks") @@ -1145,7 +1149,7 @@ function commands.check(arg) end if (not (config.get(host, "anonymous_login") or config.get(host, "authentication") == "anonymous")) - and not x509_verify_identity(host, "_xmpp-client", cert) then + and not x509_verify_identity(host, "_xmpp-server", cert) then print(" Not vaild for server-to-server connections to "..host..".") cert_ok = false end