* tests/Test-https-*: Change server port to <= 32767

This commit is contained in:
Tim Rühsen 2017-05-08 11:35:22 +02:00
parent b9fb74ddfa
commit a26e6f3527
7 changed files with 17 additions and 9 deletions

View File

@ -128,7 +128,7 @@ unless(-e $servercrt && -e $serverkey && $servercheck == 1)
# Retry the test with --no-check-certificate. expect success # Retry the test with --no-check-certificate. expect success
$port = 50443; $port = 20443;
$cmdline = $WgetTest::WGETPATH . " --ca-certificate=$cacrt". $cmdline = $WgetTest::WGETPATH . " --ca-certificate=$cacrt".
" https://$testhostname:$port/somefile.txt"; " https://$testhostname:$port/somefile.txt";

View File

@ -98,7 +98,7 @@ unless(-e $clientcert && -e $clientkey && $clientcheck == 1)
} }
# Try Wget using SSL with mismatched client cert & key . Expect error # Try Wget using SSL with mismatched client cert & key . Expect error
my $port = 51443; my $port = 21443;
my $cmdline = $WgetTest::WGETPATH . " --certificate=$clientcert ". my $cmdline = $WgetTest::WGETPATH . " --certificate=$clientcert ".
" --private-key=$serverkey ". " --private-key=$serverkey ".
" --ca-certificate=$cacrt". " --ca-certificate=$cacrt".
@ -128,7 +128,7 @@ if ($sslsock->run() == 0)
} }
# Retry wget using SSL with client certificate. Expect success # Retry wget using SSL with client certificate. Expect success
$port = 52443; $port = 22443;
$cmdline = $WgetTest::WGETPATH . " --certificate=$clientcert". $cmdline = $WgetTest::WGETPATH . " --certificate=$clientcert".
" --private-key=$clientkey ". " --private-key=$clientkey ".
" --ca-certificate=$cacrt". " --ca-certificate=$cacrt".

View File

@ -125,7 +125,7 @@ unless(-e $crlfile)
# openssl crl -text -in certs/root.crl.pem # openssl crl -text -in certs/root.crl.pem
# Retry the test with CRL. Expect Failure. # Retry the test with CRL. Expect Failure.
$port = 53443; $port = 23443;
$cmdline = $WgetTest::WGETPATH . " --crl-file=$crlfile ". $cmdline = $WgetTest::WGETPATH . " --crl-file=$crlfile ".
" --ca-certificate=$cacrt". " --ca-certificate=$cacrt".
" https://$testhostname:$port/somefile.txt"; " https://$testhostname:$port/somefile.txt";

View File

@ -3,6 +3,14 @@
use strict; use strict;
use warnings; use warnings;
# Skip this test rather than fail it when the module isn't installed
if (!eval {require IO::Socket::SSL;1;}) {
print STDERR "This test needs the perl module \"IO::Socket::SSL\".\n";
print STDERR "Install e.g. on Debian with 'apt-get install libio-socket-ssl-perl'\n";
print STDERR " or if using cpanminus 'cpanm IO::Socket::SSL' could be used to install it.\n";
exit 77; # skip
}
use SSLTest; use SSLTest;
############################################################################### ###############################################################################
@ -31,7 +39,7 @@ my $cdir = $ENV{'PWD'};
my $testhostname = "WgetTestingServer"; my $testhostname = "WgetTestingServer";
$ENV{'HOSTALIASES'} = "$cdir/certs/wgethosts"; $ENV{'HOSTALIASES'} = "$cdir/certs/wgethosts";
my $port = 54443; my $port = 24443;
my $cmdline = $WgetTest::WGETPATH . " --secure-protocol=PFS". my $cmdline = $WgetTest::WGETPATH . " --secure-protocol=PFS".
" --ca-certificate=$cdir/certs/test-ca-cert.pem". " --ca-certificate=$cdir/certs/test-ca-cert.pem".
" https://$testhostname:$port/somefile.txt"; " https://$testhostname:$port/somefile.txt";

View File

@ -51,7 +51,7 @@ unless(-e $certfile && -e $keyfile && $sscheck == 1)
} }
# Try Wget using SSL first without --no-check-certificate. expect error # Try Wget using SSL first without --no-check-certificate. expect error
my $port = 56443; my $port = 26443;
my $cmdline = $WgetTest::WGETPATH . " --ca-certificate=$cdir/certs/test-ca-cert.pem". my $cmdline = $WgetTest::WGETPATH . " --ca-certificate=$cdir/certs/test-ca-cert.pem".
" https://$testhostname:$port/somefile.txt"; " https://$testhostname:$port/somefile.txt";
my $expected_error_code = 5; my $expected_error_code = 5;
@ -79,7 +79,7 @@ if ($sslsock->run() == 0)
} }
# Retry the test with --no-check-certificate. expect success # Retry the test with --no-check-certificate. expect success
$port = 57443; $port = 27443;
$cmdline = $WgetTest::WGETPATH . " --no-check-certificate ". $cmdline = $WgetTest::WGETPATH . " --no-check-certificate ".
" --ca-certificate=$cdir/certs/test-ca-cert.pem". " --ca-certificate=$cdir/certs/test-ca-cert.pem".
" https://$testhostname:$port/somefile.txt"; " https://$testhostname:$port/somefile.txt";

View File

@ -31,7 +31,7 @@ my $cdir = $ENV{'PWD'};
my $testhostname = "WgetTestingServer"; my $testhostname = "WgetTestingServer";
$ENV{'HOSTALIASES'} = "$cdir/certs/wgethosts"; $ENV{'HOSTALIASES'} = "$cdir/certs/wgethosts";
my $port = 58443; my $port = 28443;
my $cmdline = $WgetTest::WGETPATH . " --secure-protocol=TLSv1". my $cmdline = $WgetTest::WGETPATH . " --secure-protocol=TLSv1".
" --ca-certificate=$cdir/certs/test-ca-cert.pem". " --ca-certificate=$cdir/certs/test-ca-cert.pem".
" https://$testhostname:$port/somefile.txt"; " https://$testhostname:$port/somefile.txt";

View File

@ -31,7 +31,7 @@ my $cdir = $ENV{'PWD'};
my $testhostname = "WgetTestingServer"; my $testhostname = "WgetTestingServer";
$ENV{'HOSTALIASES'} = "$cdir/certs/wgethosts"; $ENV{'HOSTALIASES'} = "$cdir/certs/wgethosts";
my $port = 59443; my $port = 29443;
my $cmdline = $WgetTest::WGETPATH . " --secure-protocol=TLSv1_1". my $cmdline = $WgetTest::WGETPATH . " --secure-protocol=TLSv1_1".
" --ca-certificate=$cdir/certs/test-ca-cert.pem". " --ca-certificate=$cdir/certs/test-ca-cert.pem".
" https://$testhostname:$port/somefile.txt"; " https://$testhostname:$port/somefile.txt";