aboutsummaryrefslogtreecommitdiff
path: root/tests/httpsserver.pl
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2007-03-08 02:38:49 +0000
committerDan Fandrich <dan@coneharvesters.com>2007-03-08 02:38:49 +0000
commit1bfa7dfe39ec74cbec28808969ba8320f0807ae4 (patch)
tree969d2808edbe0ae257a8e0eb12268e946e528354 /tests/httpsserver.pl
parent85daec253cf5a6e1eb3f023e76180f553c715de8 (diff)
Added test infrastructure to support basic FTPS tests. This currently
supports only ftps:// URLs with --ftp-ssl-control specified, which implicitly encrypts the control channel but not the data channels. That allows stunnel to be used with an unmodified ftp server in exactly the same way that the test https server is set up. Added test case 400 as a basic FTPS test.
Diffstat (limited to 'tests/httpsserver.pl')
-rw-r--r--tests/httpsserver.pl16
1 files changed, 11 insertions, 5 deletions
diff --git a/tests/httpsserver.pl b/tests/httpsserver.pl
index be4b843ad..648b148df 100644
--- a/tests/httpsserver.pl
+++ b/tests/httpsserver.pl
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
#
# $Id$
-# This is the HTTPS server designed for the curl test suite.
+# This is the HTTPS and FTPS server designed for the curl test suite.
#
# It is actually just a layer that runs stunnel properly.
@@ -18,14 +18,16 @@ my $stunnel = "stunnel";
my $verbose=0; # set to 1 for debugging
-my $port = 8433; # just our default, weird enough
-my $target_port = 8999; # test http-server port
+my $port = 8991; # just our default, weird enough
+my $target_port = 8999; # default test http-server port
my $path = `pwd`;
chomp $path;
my $srcdir=$path;
+my $proto='https';
+
do {
if($ARGV[0] eq "-v") {
$verbose=1;
@@ -33,6 +35,10 @@ do {
if($ARGV[0] eq "-w") {
return 0; # return success, means we have stunnel working!
}
+ elsif($ARGV[0] eq "-p") {
+ $proto=$ARGV[1];
+ shift @ARGV;
+ }
elsif($ARGV[0] eq "-r") {
$target_port=$ARGV[1];
shift @ARGV;
@@ -52,7 +58,7 @@ do {
my $conffile="$path/stunnel.conf"; # stunnel configuration data
my $certfile="$srcdir/stunnel.pem"; # stunnel server certificate
-my $pidfile="$path/.https.pid"; # stunnel process pid file
+my $pidfile="$path/.$proto.pid"; # stunnel process pid file
open(CONF, ">$conffile") || return 1;
print CONF "
@@ -79,7 +85,7 @@ my $version_ge_4=system("$stunnel -V 2>&1|grep '^stunnel.* on '>/dev/null 2>&1")
if ($version_ge_4) { $cmd="$stunnel $conffile"; }
if($verbose) {
- print "HTTPS server: $cmd\n";
+ print uc($proto)." server: $cmd\n";
}
my $rc = system($cmd);