diff --git a/coordinator/configure.lua b/coordinator/configure.lua index 25dc93b..7c3fe58 100644 --- a/coordinator/configure.lua +++ b/coordinator/configure.lua @@ -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) diff --git a/scada-common/network.lua b/scada-common/network.lua index 742f418..bdaf5c3 100644 --- a/scada-common/network.lua +++ b/scada-common/network.lua @@ -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 diff --git a/scada-common/util.lua b/scada-common/util.lua index 00d6e24..308bb69 100644 --- a/scada-common/util.lua +++ b/scada-common/util.lua @@ -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