Skip to content

Commit 392b0f4

Browse files
committed
fix lint
1 parent d70136e commit 392b0f4

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
run: |
3131
sudo apt install -y cpanminus build-essential libncurses5-dev libreadline-dev libssl-dev perl luarocks libpcre3 libpcre3-dev zlib1g-dev
3232
sudo luarocks install lua-resty-http > build.log 2>&1 || (cat build.log && exit 1)
33+
sudo luarocks install lua-resty-openssl > build.log 2>&1 || (cat build.log && exit 1)
3334
3435
- name: Before install
3536
run: |

lib/resty/apisix/upstream.lua

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ local get_request = base.get_request
44
local get_phase = ngx.get_phase
55
local C = ffi.C
66
local NGX_ERROR = ngx.ERROR
7+
local NGX_OK = ngx.OK
78

89

910
base.allows_subsystem("http")
@@ -31,7 +32,7 @@ function _M.set_cert_and_key(cert, key)
3132
return true
3233
end
3334

34-
local set_upstream_ssl_trusted_store
35+
local set_ssl_trusted_store
3536
do
3637
local ALLOWED_PHASES = {
3738
['rewrite'] = true,
@@ -41,7 +42,7 @@ do
4142
}
4243

4344
local openssl_x509_store = require "resty.openssl.x509.store"
44-
function set_upstream_ssl_trusted_store(store)
45+
function set_ssl_trusted_store(store)
4546
if not ALLOWED_PHASES[get_phase()] then
4647
error("API disabled in the current context", 2)
4748
end
@@ -66,7 +67,7 @@ do
6667
error("unknown return code: " .. tostring(ret))
6768
end
6869
end
69-
_M.set_upstream_ssl_trusted_store = set_upstream_ssl_trusted_store
70+
_M.set_ssl_trusted_store = set_ssl_trusted_store
7071

7172

7273
return _M

0 commit comments

Comments
 (0)