You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/09/16 09:13:07 UTC
[GitHub] [apisix] tokers commented on a diff in pull request #7925: feat: support ssl key-encrypt-salt rotation
tokers commented on code in PR #7925:
URL: https://github.com/apache/apisix/pull/7925#discussion_r972816224
##########
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:
+1
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org