Comparison

prosodyctl @ 6847:c314e9142e9d

Merge 0.10->trunk
author Kim Alvefur <zash@zash.se>
date Thu, 24 Sep 2015 20:15:19 +0200
parent 6845:bb7854355df1
child 6914:5df76208e050
comparison
equal deleted inserted replaced
6843:161cccfdf015 6847:c314e9142e9d
909 or subdomain == "chat" or subdomain == "im") then 909 or subdomain == "chat" or subdomain == "im") then
910 print(""); 910 print("");
911 print(" Suggestion: If "..host.. " is a new host with no real users yet, consider renaming it now to"); 911 print(" Suggestion: If "..host.. " is a new host with no real users yet, consider renaming it now to");
912 print(" "..host:gsub("^[^.]+%.", "")..". You can use SRV records to redirect XMPP clients and servers to "..host.."."); 912 print(" "..host:gsub("^[^.]+%.", "")..". You can use SRV records to redirect XMPP clients and servers to "..host..".");
913 print(" For more information see: http://prosody.im/doc/dns"); 913 print(" For more information see: http://prosody.im/doc/dns");
914 end
915 end
916 local all_options = set.new();
917 for host in enabled_hosts() do
918 all_options:include(set.new(it.to_array(it.keys(config[host]))));
919 end
920 local ssl = nil, dependencies.softreq"ssl";
921 if not ssl then
922 if not set.intersection(all_options, set.new({"require_encryption", "c2s_require_encryption", "s2s_require_encryption"})):empty() then
923 print("");
924 print(" You require encryption but LuaSec is not available.");
925 print(" Connections will fail.");
926 ok = false;
927 end
928 elseif not ssl.loadcertificate then
929 if all_options:contains("s2s_secure_auth") then
930 print("");
931 print(" You have set s2s_secure_auth but your version of LuaSec does ");
932 print(" not support certificate validation, so all s2s connections will");
933 print(" fail.");
934 ok = false;
935 elseif all_options:contains("s2s_secure_domains") then
936 local secure_domains = set.new();
937 for host in enabled_hosts() do
938 if config[host].s2s_secure_auth == true then
939 secure_domains:add("*");
940 else
941 secure_domains:include(set.new(config[host].s2s_secure_domains));
942 end
943 end
944 if not secure_domains:empty() then
945 print("");
946 print(" You have set s2s_secure_domains but your version of LuaSec does ");
947 print(" not support certificate validation, so s2s connections to/from ");
948 print(" these domains will fail.");
949 ok = false;
950 end
914 end 951 end
915 end 952 end
916 953
917 print("Done.\n"); 954 print("Done.\n");
918 end 955 end