Comparison

prosodyctl @ 7214:a927edfb54ab

Merge 0.10->trunk
author Kim Alvefur <zash@zash.se>
date Sun, 28 Feb 2016 18:47:32 +0100
parent 7211:117f4a627813
parent 7213:193e4c65d218
child 7251:b74421fe417a
comparison
equal deleted inserted replaced
7211:117f4a627813 7214:a927edfb54ab
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' found 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' found for for "..host) 1226 print(" No 'key' found 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);
1246 elseif not cert:validat(os.time() + 86400) then 1246 elseif not cert:validat(os.time() + 86400) then
1247 print(" Certificate expires within one day.") 1247 print(" Certificate expires within one day.")
1248 cert_ok = false 1248 cert_ok = false
1249 elseif not cert:validat(os.time() + 86400*7) then 1249 elseif not cert:validat(os.time() + 86400*7) then
1250 print(" Certificate expires within one week.") 1250 print(" Certificate expires within one week.")
1251 elseif not cert:validat(os.time() + 86400*13) then 1251 elseif not cert:validat(os.time() + 86400*31) then
1252 print(" Certificate expires within one month.") 1252 print(" Certificate expires within one month.")
1253 end 1253 end
1254 if config.get(host, "component_module") == nil 1254 if config.get(host, "component_module") == nil
1255 and not x509_verify_identity(host, "_xmpp-client", cert) then 1255 and not x509_verify_identity(host, "_xmpp-client", cert) then
1256 print(" Not vaild for client connections to "..host..".") 1256 print(" Not vaild for client connections to "..host..".")