From 49391cccf148a86d15687dc419796ca863b4927e Mon Sep 17 00:00:00 2001 From: swananan Date: Sun, 17 Dec 2023 23:59:45 +0800 Subject: [PATCH] modify test cases --- t/166-ssl-client-hello.t | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/t/166-ssl-client-hello.t b/t/166-ssl-client-hello.t index 1ece5d6b30..0cd37e246a 100644 --- a/t/166-ssl-client-hello.t +++ b/t/166-ssl-client-hello.t @@ -4,7 +4,15 @@ use Test::Nginx::Socket::Lua; repeat_each(3); -plan tests => repeat_each() * (blocks() * 6 + 8); +# All these tests need to have new openssl +my $NginxBinary = $ENV{'TEST_NGINX_BINARY'} || 'nginx'; +my $openssl_version = eval { `$NginxBinary -V 2>&1` }; + +if ($openssl_version =~ m/built with OpenSSL (0\S*|1\.0\S*|1\.1\.0\S*)/) { + plan(skip_all => "too old OpenSSL, need 1.1.1, was $1"); +} else { + plan tests => repeat_each() * (blocks() * 6 + 8); +} $ENV{TEST_NGINX_HTML_DIR} ||= html_dir(); $ENV{TEST_NGINX_MEMCACHED_PORT} ||= 11211;