aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2014-04-14 23:34:35 +0200
committerKim Alvefur <zash@zash.se>2014-04-14 23:34:35 +0200
commitc2da2e47e19128f797ddc37c3d1167adef3af875 (patch)
tree06cccee09ca57343e8a4eb7fa7cd3eb53ff8d62e
parentcdf5ff917636530444553e297736a7e153ae6909 (diff)
downloadprosody-c2da2e47e19128f797ddc37c3d1167adef3af875.tar.gz
prosody-c2da2e47e19128f797ddc37c3d1167adef3af875.zip
certmanager: Concatenate cipher list if given as a table
-rw-r--r--core/certmanager.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/certmanager.lua b/core/certmanager.lua
index 6a53f5b2..879d6131 100644
--- a/core/certmanager.lua
+++ b/core/certmanager.lua
@@ -15,6 +15,7 @@ local tostring = tostring;
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 @@ function create_context(host, mode, user_ssl_config)
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