Changeset

6844:8946052e12d2

prosodyctl check: Warn if encryption is required but LuaSec is unavailable
author Kim Alvefur <zash@zash.se>
date Thu, 24 Sep 2015 20:02:00 +0200
parents 6842:eed846384178
children 6845:bb7854355df1
files prosodyctl
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/prosodyctl	Mon Sep 21 23:19:48 2015 +0200
+++ b/prosodyctl	Thu Sep 24 20:02:00 2015 +0200
@@ -913,6 +913,19 @@
 			   	print("     For more information see: http://prosody.im/doc/dns");
 			end
 		end
+		local all_options = set.new();
+		for host in enabled_hosts() do
+			all_options:include(set.new(it.to_array(it.keys(config[host]))));
+		end
+		local ssl = nil, dependencies.softreq"ssl";
+		if not ssl then
+			if not set.intersection(all_options, set.new({"require_encryption", "c2s_require_encryption", "s2s_require_encryption"})):empty() then
+				print("");
+				print("    You require encryption but LuaSec is not available.");
+				print("    Connections will fail.");
+				ok = false;
+			end
+		end
 		
 		print("Done.\n");
 	end