Software /
code /
prosody
Diff
util/prosodyctl/cert.lua @ 12169:866d06644956
util.prosodyctl.cert: Fix boolean logic bug
Boolean logic, never correct on the first try.
We want to skip copying the same cert if it _has_ been imported already,
not if it has not.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 09 Jan 2022 21:47:04 +0100 |
parent | 12107:8a5a9c1adb90 |
child | 12199:12eaa2fdd75b |
line wrap: on
line diff
--- a/util/prosodyctl/cert.lua Sun Jan 09 18:52:58 2022 +0100 +++ b/util/prosodyctl/cert.lua Sun Jan 09 21:47:04 2022 +0100 @@ -223,7 +223,7 @@ local imported = {}; for _, host in ipairs(hostnames) do local paths = cm.find_cert_in_index(files_by_name, host); - if paths and not imported[paths.certificate] then + if paths and imported[paths.certificate] then -- One certificate, many mames! table.insert(imported, host); elseif paths then