Skip to content

Commit

Permalink
fix code
Browse files Browse the repository at this point in the history
  • Loading branch information
oowl committed Sep 25, 2024
1 parent dab7ccf commit fd9f260
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/ngx_http_lua_kong_ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "ngx_http_lua_socket_tcp.h"
#include "ngx_http_lua_ssl.h"
#include "ngx_http_lua_util.h"

/*
* disables session reuse for the current TLS connection, must be called
* in ssl_certby_lua* phase
Expand Down
16 changes: 8 additions & 8 deletions t/012-tls_disable_http2_alpn.t
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ __DATA__
server {
listen unix:$TEST_NGINX_HTML_DIR/nginx.sock ssl;
listen 60000 ssl;
server_name konghq.com;
ssl_certificate ../../certs/test.crt;
ssl_certificate_key ../../certs/test.key;
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;
Expand All @@ -51,7 +51,7 @@ __DATA__
location /t {
content_by_lua_block {
local ngx_pipe = require "ngx.pipe"
local proc = ngx_pipe.spawn({'curl', '-vk', '--resolve', 'konghq.com:60000:127.0.0.1', 'https://konghq.com:60000'})
local proc = ngx_pipe.spawn({'curl', '-vk', '--resolve', 'example.com:60000:127.0.0.1', 'https://example.com:60000'})
local stdout_data, err = proc:stdout_read_all()
if not stdout_data then
ngx.say(err)
Expand Down Expand Up @@ -92,9 +92,9 @@ alpn server accepted http/1.1
server {
listen unix:$TEST_NGINX_HTML_DIR/nginx.sock ssl;
listen 60000 ssl;
server_name konghq.com;
ssl_certificate ../../certs/test.crt;
ssl_certificate_key ../../certs/test.key;
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;
Expand All @@ -117,7 +117,7 @@ alpn server accepted http/1.1
location /t {
content_by_lua_block {
local ngx_pipe = require "ngx.pipe"
local proc = ngx_pipe.spawn({'curl', '-vk', '--resolve', 'konghq.com:60000:127.0.0.1', 'https://konghq.com:60000'})
local proc = ngx_pipe.spawn({'curl', '-vk', '--resolve', 'example.com:60000:127.0.0.1', 'https://example.com:60000'})
local stdout_data, err = proc:stdout_read_all()
if not stdout_data then
ngx.say(err)
Expand Down

0 comments on commit fd9f260

Please sign in to comment.