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
commita43c400bf861e176a460d9d374328fa0f30cdfc5 (patch)
treeaed71c21088c651ec94d43c10e91d9ab35666e1b /core
parent5dc9451f0eaf11fb38b52c0ad9bcd4aaa17b05e2 (diff)
downloadprosody-a43c400bf861e176a460d9d374328fa0f30cdfc5.tar.gz
prosody-a43c400bf861e176a460d9d374328fa0f30cdfc5.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