[PATCH 6 of 6] Tests: added missing socket_ssl_reused prerequisites

Maxim Dounin mdounin at mdounin.ru
Tue May 23 02:38:08 UTC 2023


Hello!

On Mon, May 22, 2023 at 11:52:18PM +0400, Sergey Kandaurov wrote:

> # HG changeset patch
> # User Sergey Kandaurov <pluknet at nginx.com>
> # Date 1684784712 -14400
> #      Mon May 22 23:45:12 2023 +0400
> # Node ID 193b129568708d6689c7cb8707f46bca7280a0d0
> # Parent  633613b924b957fc18dde972ff346fe92b9e823e
> Tests: added missing socket_ssl_reused prerequisites.
> 
> diff --git a/mail_ssl_session_reuse.t b/mail_ssl_session_reuse.t
> --- a/mail_ssl_session_reuse.t
> +++ b/mail_ssl_session_reuse.t
> @@ -27,7 +27,7 @@ select STDOUT; $| = 1;
>  local $SIG{PIPE} = 'IGNORE';
>  
>  my $t = Test::Nginx->new()->has(qw/mail mail_ssl imap socket_ssl_sslversion/)
> -	->has_daemon('openssl')->plan(7);
> +	->has(qw/socket_ssl_reused/)->has_daemon('openssl')->plan(7);
>  
>  $t->write_file_expand('nginx.conf', <<'EOF');
>  
> diff --git a/stream_ssl_session_reuse.t b/stream_ssl_session_reuse.t
> --- a/stream_ssl_session_reuse.t
> +++ b/stream_ssl_session_reuse.t
> @@ -27,7 +27,7 @@ select STDERR; $| = 1;
>  select STDOUT; $| = 1;
>  
>  my $t = Test::Nginx->new()->has(qw/stream stream_ssl socket_ssl_sslversion/)
> -	->has_daemon('openssl')->plan(7);
> +	->has(qw/socket_ssl_reused/)->has_daemon('openssl')->plan(7);
>  
>  $t->write_file_expand('nginx.conf', <<'EOF');
>  

Style nitpicking:

diff --git a/mail_ssl_session_reuse.t b/mail_ssl_session_reuse.t
--- a/mail_ssl_session_reuse.t
+++ b/mail_ssl_session_reuse.t
@@ -26,7 +26,8 @@ select STDOUT; $| = 1;
 
 local $SIG{PIPE} = 'IGNORE';
 
-my $t = Test::Nginx->new()->has(qw/mail mail_ssl imap socket_ssl_sslversion/)
+my $t = Test::Nginx->new()
+	->has(qw/mail mail_ssl imap socket_ssl_sslversion socket_ssl_reused/)
 	->has_daemon('openssl')->plan(7);
 
 $t->write_file_expand('nginx.conf', <<'EOF');
diff --git a/stream_ssl_session_reuse.t b/stream_ssl_session_reuse.t
--- a/stream_ssl_session_reuse.t
+++ b/stream_ssl_session_reuse.t
@@ -26,7 +26,8 @@ use Test::Nginx::Stream qw/ stream /;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->has(qw/stream stream_ssl socket_ssl_sslversion/)
+my $t = Test::Nginx->new()
+	->has(qw/stream stream_ssl socket_ssl_sslversion socket_ssl_reused/)
 	->has_daemon('openssl')->plan(7);
 
 $t->write_file_expand('nginx.conf', <<'EOF');


Also, just using socket_ssl_reused should be enough, since 
get_session_reused() appeared in IO::Socket::SSL 2.057, and this 
implies that get_sslversion(), which appeared in IO::Socket::SSL 
1.964, is also available.  I don't object being explicit and 
listing both though, given that this order is not obvious (in 
contrast to SNI vs. ALPN one).

Otherwise looks good.

-- 
Maxim Dounin
http://mdounin.ru/


More information about the nginx-devel mailing list