aboutsummaryrefslogtreecommitdiffstats
path: root/lualib/lua_settings.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-07-05 18:46:17 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-07-05 18:46:17 +0100
commit6ba7b6d32f6bde52b22c4e52381384495b52154a (patch)
tree410caf67c6431184ea0632d82ff8fb4369eeb882 /lualib/lua_settings.lua
parent62f9156987d30770f5314041a6b0fb6c4383a460 (diff)
downloadrspamd-6ba7b6d32f6bde52b22c4e52381384495b52154a.tar.gz
rspamd-6ba7b6d32f6bde52b22c4e52381384495b52154a.zip
[Minor] Minor fixes
Diffstat (limited to 'lualib/lua_settings.lua')
-rw-r--r--lualib/lua_settings.lua10
1 files changed, 2 insertions, 8 deletions
diff --git a/lualib/lua_settings.lua b/lualib/lua_settings.lua
index b472386b5..fb1a70217 100644
--- a/lualib/lua_settings.lua
+++ b/lualib/lua_settings.lua
@@ -153,14 +153,7 @@ local function register_settings_cb()
for _,set in pairs(known_ids) do
set.symbols = lua_util.keys(fun.filter(function(_, v) return v end, set.symbols))
table.sort(set.symbols)
-
- -- Create digest from sorted symbols
- local cr = require "rspamd_cryptobox_hash"
- local h = cr.create()
- for _,sym in ipairs(set.symbols) do
- h:update(sym)
- end
- set.digest = h:base32()
+ set.digest = lua_util.table_digest(set.symbols)
end
post_init_performed = true
@@ -216,6 +209,7 @@ local function settings_by_id(id)
return known_ids[id]
end
+
exports.settings_by_id = settings_by_id
exports.all_settings = known_ids
exports.all_symbols = all_symbols