Mercurial > prosody-hg
comparison core/certmanager.lua @ 8494:4f75f4da6d4e
certmanager: Check for missing certificate before key in configuration (should be marginally less confusing)
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Thu, 28 Dec 2017 17:32:56 +0100 |
| parents | a3cf899fd61b |
| children | 4f0f5b49bb03 1a29b56a2d63 |
comparison
equal
deleted
inserted
replaced
| 8479:867679b0fb03 | 8494:4f75f4da6d4e |
|---|---|
| 174 cfg:apply(select(i, ...)); | 174 cfg:apply(select(i, ...)); |
| 175 end | 175 end |
| 176 local user_ssl_config = cfg:final(); | 176 local user_ssl_config = cfg:final(); |
| 177 | 177 |
| 178 if mode == "server" then | 178 if mode == "server" then |
| 179 if not user_ssl_config.certificate then return nil, "No certificate present in SSL/TLS configuration for "..host; end | |
| 179 if not user_ssl_config.key then return nil, "No key present in SSL/TLS configuration for "..host; end | 180 if not user_ssl_config.key then return nil, "No key present in SSL/TLS configuration for "..host; end |
| 180 if not user_ssl_config.certificate then return nil, "No certificate present in SSL/TLS configuration for "..host; end | |
| 181 end | 181 end |
| 182 | 182 |
| 183 for option in pairs(path_options) do | 183 for option in pairs(path_options) do |
| 184 if type(user_ssl_config[option]) == "string" then | 184 if type(user_ssl_config[option]) == "string" then |
| 185 user_ssl_config[option] = resolve_path(config_path, user_ssl_config[option]); | 185 user_ssl_config[option] = resolve_path(config_path, user_ssl_config[option]); |
