Software /
code /
prosody
Changeset
7145:b1a109858502
certmanager: Try filename.key if certificate is set to a full filename ending with .crt
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 05 Feb 2016 16:12:01 +0100 |
parents | 7144:f855ba7da30e |
children | 7146:c793f9d13a36 7149:bb0fd02ae70f |
files | core/certmanager.lua |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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