Software /
code /
prosody
Changeset
6074:6498554adb0d
certmanager: Allow non-server contexts to be without certificate and key
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 14 Apr 2014 23:09:28 +0200 |
parents | 6073:4a1fdd72e98a |
children | 6075:524060125f9c |
files | core/certmanager.lua |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/core/certmanager.lua Mon Apr 14 23:00:44 2014 +0200 +++ b/core/certmanager.lua Mon Apr 14 23:09:28 2014 +0200 @@ -87,8 +87,10 @@ 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