aboutsummaryrefslogtreecommitdiffstats
path: root/core/certmanager.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2017-09-26 17:24:25 +0100
committerMatthew Wild <mwild1@gmail.com>2017-09-26 17:24:25 +0100
commitd6833915bcfaeb6600c0af911102a8362e26e93e (patch)
tree575fdc7082baf42f3c7871cac1bc03d7fa65f905 /core/certmanager.lua
parent43e5d4df2985e069c52fb21e4636e3e44053d1bf (diff)
parent86ee041be81ad313a24c87b6e38f92fe4400cf17 (diff)
downloadprosody-d6833915bcfaeb6600c0af911102a8362e26e93e.tar.gz
prosody-d6833915bcfaeb6600c0af911102a8362e26e93e.zip
Merge 0.10->trunk
Diffstat (limited to 'core/certmanager.lua')
-rw-r--r--core/certmanager.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/certmanager.lua b/core/certmanager.lua
index 2e237595..288836ce 100644
--- a/core/certmanager.lua
+++ b/core/certmanager.lua
@@ -58,6 +58,7 @@ local key_try = { "", "/%s.key", "/%s/privkey.pem", "/%s.pem", };
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 @@ local function find_cert(user_certs, name)
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)