aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2014-04-14 23:09:28 +0200
committerKim Alvefur <zash@zash.se>2014-04-14 23:09:28 +0200
commitcdf5ff917636530444553e297736a7e153ae6909 (patch)
treeaed71c21088c651ec94d43c10e91d9ab35666e1b /core
parent05d6f3e7136d1ca40429ccfbd87f664280551af7 (diff)
downloadprosody-cdf5ff917636530444553e297736a7e153ae6909.tar.gz
prosody-cdf5ff917636530444553e297736a7e153ae6909.zip
certmanager: Allow non-server contexts to be without certificate and key
Diffstat (limited to 'core')
-rw-r--r--core/certmanager.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/certmanager.lua b/core/certmanager.lua
index 957923f5..6a53f5b2 100644
--- a/core/certmanager.lua
+++ b/core/certmanager.lua
@@ -87,8 +87,10 @@ function create_context(host, mode, user_ssl_config)
end
end
- 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
+ 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
+ end
-- LuaSec expects dhparam to be a callback that takes two arguments.
-- We ignore those because it is mostly used for having a separate