Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multi ssl bug #1818

Merged
merged 19 commits into from
Jul 10, 2020
7 changes: 3 additions & 4 deletions apisix/http/router/radixtree_sni.lua
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ local function create_router(ssl_items)
end
end

local
idx = idx + 1
route_items[idx] = {
paths = sni,
Expand Down Expand Up @@ -159,7 +158,7 @@ function _M.match_and_set(api_ctx)
local sni_rev = sni:reverse()
local ok = radixtree_router:dispatch(sni_rev, nil, api_ctx)
if not ok then
core.log.warn("not found any valid sni configuration")
core.log.warn("failed to found any SSL certificate by sni: ", sni)
return false
membphis marked this conversation as resolved.
Show resolved Hide resolved
end

Expand All @@ -172,13 +171,13 @@ function _M.match_and_set(api_ctx)
end
end
if not matched then
core.log.warn("not found any valid sni configuration, matched sni: ",
core.log.warn("failed to found any valid sni configuration, matched sni: ",
nic-chen marked this conversation as resolved.
Show resolved Hide resolved
core.json.delay_encode(api_ctx.matched_sni, true), " current sni: ", sni)
return false
end
else
if str_find(sni_rev, ".", #api_ctx.matched_sni, true) then
core.log.warn("not found any valid sni configuration, matched sni: ",
core.log.warn("failed to found any valid sni configuration, matched sni: ",
api_ctx.matched_sni:reverse(), " current sni: ", sni)
return false
end
Expand Down