Software / code / prosody
Comparison
prosodyctl @ 7209:92e5036bc55c
prosodyctl: check certs: Update messages to account for 'ssl' option maybe not existing
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sun, 28 Feb 2016 18:23:24 +0100 |
| parent | 7208:f666d50cc32b |
| child | 7210:48149ecbb649 |
comparison
equal
deleted
inserted
replaced
| 7208:f666d50cc32b | 7209:92e5036bc55c |
|---|---|
| 1218 local ok, err, ssl_config = create_context(host, "server", host_ssl_config, global_ssl_config); | 1218 local ok, err, ssl_config = create_context(host, "server", host_ssl_config, global_ssl_config); |
| 1219 if not ok then | 1219 if not ok then |
| 1220 print(" Error: "..err); | 1220 print(" Error: "..err); |
| 1221 cert_ok = false | 1221 cert_ok = false |
| 1222 elseif not ssl_config.certificate then | 1222 elseif not ssl_config.certificate then |
| 1223 print(" No 'certificate' set in ssl option for "..host) | 1223 print(" No 'certificate' found for "..host) |
| 1224 cert_ok = false | 1224 cert_ok = false |
| 1225 elseif not ssl_config.key then | 1225 elseif not ssl_config.key then |
| 1226 print(" No 'key' set in ssl option for "..host) | 1226 print(" No 'key' found for for "..host) |
| 1227 cert_ok = false | 1227 cert_ok = false |
| 1228 else | 1228 else |
| 1229 local key, err = io.open(ssl_config.key); -- Permissions check only | 1229 local key, err = io.open(ssl_config.key); -- Permissions check only |
| 1230 if not key then | 1230 if not key then |
| 1231 print(" Could not open "..ssl_config.key..": "..err); | 1231 print(" Could not open "..ssl_config.key..": "..err); |