File tree Expand file tree Collapse file tree 1 file changed +35
-1
lines changed Expand file tree Collapse file tree 1 file changed +35
-1
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ use Test::Nginx::Socket::Lua;
4
4
5
5
repeat_each(2 );
6
6
7
- plan tests => repeat_each() * (blocks() * 7 ) ;
7
+ plan tests => repeat_each() * 219 ;
8
8
9
9
$ ENV {TEST_NGINX_HTML_DIR} ||= html_dir();
10
10
@@ -2584,3 +2584,37 @@ SSL reused session
2584
2584
[alert]
2585
2585
--- timeout: 5
2586
2586
2587
+
2588
+
2589
+ === TEST 32: handshake, too many arguments
2590
+ --- config
2591
+ server_tokens off;
2592
+ resolver $ TEST_NGINX_RESOLVER ;
2593
+ location /t {
2594
+ # set $port 5000;
2595
+ set $ port $ TEST_NGINX_MEMCACHED_PORT ;
2596
+
2597
+ content_by_lua_block {
2598
+ local sock = ngx. socket. tcp()
2599
+ sock: settimeout(2000 )
2600
+
2601
+ local ok , err = sock: connect(" g.sregex.org" , 443 )
2602
+ if not ok then
2603
+ ngx. say (" failed to connect: " , err)
2604
+ return
2605
+ end
2606
+
2607
+ ngx. say (" connected: " , ok )
2608
+
2609
+ local session, err = sock. sslhandshake()
2610
+ }
2611
+ }
2612
+
2613
+ --- request
2614
+ GET /t
2615
+ --- ignore_response
2616
+ --- error_log eval
2617
+ qr/\[error\] .* ngx.socket connect: expecting 1 ~ 4 arguments \(including the object\), but seen 0/
2618
+ --- no_error_log
2619
+ [alert]
2620
+ --- timeout: 5
You can’t perform that action at this time.
0 commit comments