fixed bug with hmac still being used for connecting in coordinator configurator after clearing key

This commit is contained in:
Mikayla Fischler 2024-02-22 19:25:55 -05:00
parent 0b0051dc2f
commit f207a950e4
3 changed files with 7 additions and 2 deletions

View File

@ -469,7 +469,7 @@ local function config_view(display)
key_err.hide(true)
-- init mac for supervisor connection
if string.len(v) >= 8 then network.init_mac(tmp_cfg.AuthKey) end
if string.len(v) >= 8 then network.init_mac(tmp_cfg.AuthKey) else network.deinit_mac() end
main_pane.set_value(3)

View File

@ -53,6 +53,11 @@ function network.init_mac(passkey)
return init_time
end
-- de-initialize message authentication system
function network.deinit_mac()
c_eng.key, c_eng.hmac = nil, nil
end
-- generate HMAC of message
---@nodiscard
---@param message string initial value concatenated with ciphertext

View File

@ -22,7 +22,7 @@ local t_pack = table.pack
local util = {}
-- scada-common version
util.version = "1.1.15"
util.version = "1.1.16"
util.TICK_TIME_S = 0.05
util.TICK_TIME_MS = 50