changeset 430:a82b02635614

Tests: skip ssl tests with ancient IO::Socket::SSL. The IO::Socket::SSL::SSL_VERIFY_NONE was introduced in IO::Socket:SSL 1.31 (2009.09.25), and it seems to be too new for some Linux distros (notably, CentOS 5).
author Maxim Dounin <mdounin@mdounin.ru>
date Tue, 08 Jul 2014 16:34:31 +0400
parents 89f7a882d692
children 05c46688b54b
files ssl.t ssl_password_file.t
diffstat 2 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ssl.t
+++ b/ssl.t
@@ -22,10 +22,10 @@ use Test::Nginx;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-eval {
-	require IO::Socket::SSL;
-};
+eval { require IO::Socket::SSL; };
 plan(skip_all => 'IO::Socket::SSL not installed') if $@;
+eval { IO::Socket::SSL::SSL_VERIFY_NONE(); };
+plan(skip_all => 'IO::Socket::SSL too old') if $@;
 
 my $t = Test::Nginx->new()->has(qw/http http_ssl rewrite/)
 	->has_daemon('openssl');
--- a/ssl_password_file.t
+++ b/ssl_password_file.t
@@ -25,8 +25,11 @@ use Test::Nginx;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-eval { require IO::Socket::SSL; };
+eval { require IO::Socket::SSL; IO::Socket::SSL::SSL_VERIFY_NONE(); };
 plan(skip_all => 'IO::Socket::SSL not installed') if $@;
+eval { IO::Socket::SSL::SSL_VERIFY_NONE(); };
+plan(skip_all => 'IO::Socket::SSL too old') if $@;
+
 plan(skip_all => 'win32') if $^O eq 'MSWin32';
 
 my $t = Test::Nginx->new()->has(qw/http http_ssl/)->has_daemon('openssl');