Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
StarlightIbuki committed Oct 15, 2024
1 parent 3a0fbaa commit b33420c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 30 deletions.
14 changes: 2 additions & 12 deletions t/001-tls.t
Original file line number Diff line number Diff line change
Expand Up @@ -500,18 +500,8 @@ ok


=== TEST 8: ssl.get_request_ssl_pointer works well
--- stream_config
lua_package_path "../lua-resty-core/lib/?.lua;lualib/?.lua;;";
lua_ssl_protocols SSLV3 TLSv1 TLSv1.1 TLSv1.2;
server {
listen unix:$TEST_NGINX_HTML_DIR/nginx.sock ssl;
server_name example.com;
ssl_certificate ../../cert/example.com.crt;
ssl_certificate_key ../../cert/example.com.key;
ssl_session_cache off;
ssl_session_tickets on;
server_tokens off;

--- config
location /t {
content_by_lua_block {
local ssl = require "resty.kong.tls"
if ssl.get_request_ssl_pointer() == nil then
Expand Down
26 changes: 8 additions & 18 deletions t/stream/003-tls.t
Original file line number Diff line number Diff line change
Expand Up @@ -445,24 +445,14 @@ ok


=== TEST 8: ssl.get_request_ssl_pointer works well
--- stream_config
lua_package_path "../lua-resty-core/lib/?.lua;lualib/?.lua;;";

server {
listen unix:$TEST_NGINX_HTML_DIR/nginx.sock ssl;
ssl_certificate ../../cert/example.com.crt;
ssl_certificate_key ../../cert/example.com.key;
ssl_session_cache off;
ssl_session_tickets on;

content_by_lua_block {
local ssl = require "resty.kong.tls"
if ssl.get_request_ssl_pointer() == nil then
ngx.say("cannot get socket")
else
ngx.say("ok")
end
}
--- stream_server_config
content_by_lua_block {
local ssl = require "resty.kong.tls"
if ssl.get_request_ssl_pointer() == nil then
ngx.say("cannot get socket")
else
ngx.say("ok")
end
}

--- response_body
Expand Down

0 comments on commit b33420c

Please sign in to comment.