monkeyDluffy6017 commented on code in PR #7925:
URL: https://github.com/apache/apisix/pull/7925#discussion_r972877912
##########
apisix/ssl.lua:
##########
@@ -55,23 +56,37 @@ function _M.server_name()
end
-local _aes_128_cbc_with_iv = false
+local _aes_128_cbc_with_iv_tbl = false
local function get_aes_128_cbc_with_iv()
- if _aes_128_cbc_with_iv == false then
+ if _aes_128_cbc_with_iv_tbl == false then
+ _aes_128_cbc_with_iv_tbl = core.table.new(2, 0)
local local_conf = core.config.local_conf()
- local iv = core.table.try_read_attr(local_conf, "apisix", "ssl",
"key_encrypt_salt")
- if type(iv) =="string" and #iv == 16 then
- _aes_128_cbc_with_iv = assert(aes:new(iv, nil, aes.cipher(128,
"cbc"), {iv = iv}))
- else
- _aes_128_cbc_with_iv = nil
+ local ivs = core.table.try_read_attr(local_conf, "apisix", "ssl",
"key_encrypt_salt")
+ local type_ivs = type(ivs)
+
+ if type_ivs == "table" then
+ for index, iv in ipairs(ivs) do
+ if type(iv) == "string" and #iv == 16 then
Review Comment:
Done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]