# HG changeset patch # User Matthew Wild # Date 1506183209 -3600 # Node ID db063671b73e3e000253f256769805687439ad9d # Parent 503f424d4f07f05a00cf255ff096c172800d1207 certmanager: Add debug logging (thanks av6) diff -r 503f424d4f07 -r db063671b73e core/certmanager.lua --- a/core/certmanager.lua Sat Sep 23 13:39:16 2017 +0100 +++ b/core/certmanager.lua Sat Sep 23 17:13:29 2017 +0100 @@ -58,6 +58,7 @@ local function find_cert(user_certs, name) local certs = resolve_path(config_path, user_certs or global_certificates); + log("debug", "Searching %s for a key and certificate for %s...", certs, name); for i = 1, #crt_try do local crt_path = certs .. crt_try[i]:format(name); local key_path = certs .. key_try[i]:format(name); @@ -66,13 +67,16 @@ if key_path:sub(-4) == ".crt" then key_path = key_path:sub(1, -4) .. "key"; if stat(key_path, "mode") == "file" then + log("debug", "Selecting certificate %s with key %s for %s", crt_path, key_path, name); return { certificate = crt_path, key = key_path }; end elseif stat(key_path, "mode") == "file" then + log("debug", "Selecting certificate %s with key %s for %s", crt_path, key_path, name); return { certificate = crt_path, key = key_path }; end end end + log("debug", "No certificate/key found for %s", name); end local function find_host_cert(host)