# HG changeset patch # User Kim Alvefur # Date 1454685121 -3600 # Node ID b1a10985850242fe0efd215748eb4b9f18f3239d # Parent f855ba7da30efc0376a535dc5cbf1cd4dab458c9 certmanager: Try filename.key if certificate is set to a full filename ending with .crt diff -r f855ba7da30e -r b1a109858502 core/certmanager.lua --- a/core/certmanager.lua Fri Feb 05 15:03:39 2016 +0100 +++ b/core/certmanager.lua Fri Feb 05 16:12:01 2016 +0100 @@ -63,14 +63,13 @@ local key_path = certs .. key_try[i]:format(name); if stat(crt_path, "mode") == "file" then - if stat(key_path, "mode") == "file" then - return { certificate = crt_path, key = key_path }; - end if key_path:sub(-4) == ".crt" then key_path = key_path:sub(1, -4) .. "key"; if stat(key_path, "mode") == "file" then return { certificate = crt_path, key = key_path }; end + elseif stat(key_path, "mode") == "file" then + return { certificate = crt_path, key = key_path }; end end end