Software /
code /
prosody
Comparison
core/certmanager.lua @ 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 |
parent | 6073:4a1fdd72e98a |
child | 6075:524060125f9c |
comparison
equal
deleted
inserted
replaced
6073:4a1fdd72e98a | 6074:6498554adb0d |
---|---|
85 if type(user_ssl_config[option]) == "string" then | 85 if type(user_ssl_config[option]) == "string" then |
86 user_ssl_config[option] = resolve_path(config_path, user_ssl_config[option]); | 86 user_ssl_config[option] = resolve_path(config_path, user_ssl_config[option]); |
87 end | 87 end |
88 end | 88 end |
89 | 89 |
90 if not user_ssl_config.key then return nil, "No key present in SSL/TLS configuration for "..host; end | 90 if mode == "server" then |
91 if not user_ssl_config.certificate then return nil, "No certificate present in SSL/TLS configuration for "..host; end | 91 if not user_ssl_config.key then return nil, "No key present in SSL/TLS configuration for "..host; end |
92 if not user_ssl_config.certificate then return nil, "No certificate present in SSL/TLS configuration for "..host; end | |
93 end | |
92 | 94 |
93 -- LuaSec expects dhparam to be a callback that takes two arguments. | 95 -- LuaSec expects dhparam to be a callback that takes two arguments. |
94 -- We ignore those because it is mostly used for having a separate | 96 -- We ignore those because it is mostly used for having a separate |
95 -- set of params for EXPORT ciphers, which we don't have by default. | 97 -- set of params for EXPORT ciphers, which we don't have by default. |
96 if type(user_ssl_config.dhparam) == "string" then | 98 if type(user_ssl_config.dhparam) == "string" then |