]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
trust_anchors: improve error messages
authorTomas Krizek <tomas.krizek@nic.cz>
Thu, 28 Mar 2019 11:41:32 +0000 (12:41 +0100)
committerPetr Špaček <petr.spacek@nic.cz>
Thu, 4 Apr 2019 12:18:59 +0000 (14:18 +0200)
daemon/lua/trust_anchors.lua.in

index e2ba3bc9f00979b6f1e76daec56b3bc6b1708138..331f15b4ff468f9f2e929019b5c56bcc4c7b0a07 100644 (file)
@@ -324,7 +324,7 @@ local function add_file(path, unmanaged)
        local managed = not unmanaged
        if managed then
                if not ta_update then
-                       panic('[ ta ] automatic update for TA ' .. owner_str .. ' requested, '
+                       panic('[ ta ] automatic update for ' .. path .. ' requested, '
                                .. 'but required module ta_update is not loaded')
                end
                if not io.open(path .. '.lock', 'w') then
@@ -441,7 +441,7 @@ trust_anchors = {
        -- Load keys from a file, 5011-managed by default.
        -- If managed and the file doesn't exist, try bootstrapping the root into it.
        add_file = add_file,
-       config = function() upgrade_required('trust_anchors.config was removed, see add_file()') end,
+       config = function() upgrade_required('trust_anchors.config was removed, use trust_anchors.add_file()') end,
        remove = remove,
 
        keyset_publish = keyset_publish,
@@ -527,9 +527,9 @@ trust_anchors = {
 setmetatable(trust_anchors, {
        __newindex = function (t,k,v)
        if     k == 'file' then
-              upgrade_required('trust_anchors.file was removed, see add_file()')
+              upgrade_required('trust_anchors.file was removed, use trust_anchors.add_file()')
        elseif k == 'negative' then
-              upgrade_required('trust_anchors.negative was removed, see set_insecure()')
+              upgrade_required('trust_anchors.negative was removed, use trust_anchors.set_insecure()')
        elseif k == 'keyfile_default' then
               upgrade_required('trust_anchors.keyfile_default is now compiled in, see trust_anchors.remove()')
        else   rawset(t, k, v) end