Skip to content

Commit 9178aa1

Browse files
balancer patch should not contain reject in handshake patch
1 parent 31686e2 commit 9178aa1

File tree

1 file changed

+0
-48
lines changed

1 file changed

+0
-48
lines changed

patch/1.27.1.1/lua-resty-core-enable_keepalive.patch

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -141,51 +141,3 @@ index 18bdc2c..cc1c61a 100644
141141
if rc == FFI_OK then
142142
return true
143143
end
144-
diff --git lib/ngx/ssl.lua lib/ngx/ssl.lua
145-
index b696bea..f3b20e0 100644
146-
--- lib/ngx/ssl.lua
147-
+++ lib/ngx/ssl.lua
148-
@@ -100,7 +100,7 @@ if subsystem == 'http' then
149-
void ngx_http_lua_ffi_free_priv_key(void *cdata);
150-
151-
int ngx_http_lua_ffi_ssl_verify_client(void *r,
152-
- void *client_certs, void *trusted_certs, int depth, char **err);
153-
+ void *client_certs, void *trusted_certs, int depth, int reject_in_handshake, char **err);
154-
155-
int ngx_http_lua_ffi_ssl_client_random(ngx_http_request_t *r,
156-
const unsigned char *out, size_t *outlen, char **err);
157-
@@ -198,7 +198,7 @@ elseif subsystem == 'stream' then
158-
void ngx_stream_lua_ffi_free_priv_key(void *cdata);
159-
160-
int ngx_stream_lua_ffi_ssl_verify_client(void *r,
161-
- void *client_certs, void *trusted_certs, int depth, char **err);
162-
+ void *client_certs, void *trusted_certs, int depth, int reject_in_handshake, char **err);
163-
164-
int ngx_stream_lua_ffi_ssl_client_random(ngx_stream_lua_request_t *r,
165-
unsigned char *out, size_t *outlen, char **err);
166-
@@ -484,7 +484,7 @@ function _M.set_priv_key(priv_key)
167-
end
168-
169-
170-
-function _M.verify_client(client_certs, depth, trusted_certs)
171-
+function _M.verify_client(client_certs, depth, trusted_certs, reject_in_handshake)
172-
local r = get_request()
173-
if not r then
174-
error("no request found")
175-
@@ -494,8 +494,15 @@ function _M.verify_client(client_certs, depth, trusted_certs)
176-
depth = -1
177-
end
178-
179-
+ if reject_in_handshake == nil then
180-
+ -- reject by default so we can migrate to the new behavior
181-
+ -- without modifying Lua code
182-
+ reject_in_handshake = true
183-
+ end
184-
+
185-
+ local reject_in_handshake_int = reject_in_handshake and 1 or 0
186-
local rc = ngx_lua_ffi_ssl_verify_client(r, client_certs, trusted_certs,
187-
- depth, errmsg)
188-
+ depth, reject_in_handshake_int, errmsg)
189-
if rc == FFI_OK then
190-
return true
191-
end

0 commit comments

Comments
 (0)