certmanager: Concatenate cipher list if given as a table
authorKim Alvefur <zash@zash.se>
Mon, 14 Apr 2014 23:34:35 +0200
changeset 6075 524060125f9c
parent 6074 6498554adb0d
child 6076 e0713386319a
certmanager: Concatenate cipher list if given as a table
core/certmanager.lua
--- a/core/certmanager.lua	Mon Apr 14 23:09:28 2014 +0200
+++ b/core/certmanager.lua	Mon Apr 14 23:34:35 2014 +0200
@@ -15,6 +15,7 @@
 local pairs = pairs;
 local type = type;
 local io_open = io.open;
+local t_concat = table.concat;
 
 local prosody = prosody;
 local resolve_path = configmanager.resolve_relative_path;
@@ -87,6 +88,11 @@
 		end
 	end
 
+	-- Allow the cipher list to be a table
+	if type(user_ssl_config.ciphers) == "table" then
+		user_ssl_config.ciphers = t_concat(user_ssl_config.ciphers, ":")
+	end
+
 	if mode == "server" then
 		if not user_ssl_config.key then return nil, "No key present in SSL/TLS configuration for "..host; end
 		if not user_ssl_config.certificate then return nil, "No certificate present in SSL/TLS configuration for "..host; end