aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarc Hoersken <info@marc-hoersken.de>2014-12-19 17:16:19 +0100
committerMarc Hoersken <info@marc-hoersken.de>2014-12-19 17:16:19 +0100
commit3b7bf293851d25604c8edd58b50731d2bdede4a7 (patch)
treeda7a1e45324af4ab4a48a04c4dc24482459b40b1 /tests
parenta390329f60f40484ba6bad55ba72628bc0b7352c (diff)
secureserver.pl: make OpenSSL CApath and cert absolute path values
Recent stunnel versions (5.08) seem to have trouble with relative paths on Windows. This turns the relative paths into absolute ones.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/secureserver.pl8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/secureserver.pl b/tests/secureserver.pl
index 4b7a23b61..62ce0a51f 100755
--- a/tests/secureserver.pl
+++ b/tests/secureserver.pl
@@ -33,6 +33,7 @@ BEGIN {
use strict;
use warnings;
use Cwd;
+use Cwd 'abs_path';
use serverhelp qw(
server_pidfilename
@@ -62,6 +63,7 @@ my $ipvnum = 4; # default IP version of stunneled server
my $idnum = 1; # dafault stunneled server instance number
my $proto = 'https'; # default secure server protocol
my $conffile; # stunnel configuration file
+my $capath; # certificate chain PEM folder
my $certfile; # certificate chain PEM file
#***************************************************************************
@@ -178,7 +180,9 @@ if(!$logfile) {
$conffile = "$path/stunnel.conf";
+$capath = abs_path($path);
$certfile = "$srcdir/". ($stuncert?"certs/$stuncert":"stunnel.pem");
+$certfile = abs_path($certfile);
my $ssltext = uc($proto) ." SSL/TLS:";
@@ -254,7 +258,7 @@ if($stunnel_version >= 400) {
# stunnel configuration file
if(open(STUNCONF, ">$conffile")) {
print STUNCONF "
- CApath = $path
+ CApath = $capath
cert = $certfile
debug = $loglevel
socket = $socketopt";
@@ -285,7 +289,7 @@ if($stunnel_version >= 400) {
if($verbose) {
print uc($proto) ." server (stunnel $ver_major.$ver_minor)\n";
print "cmd: $cmd\n";
- print "CApath = $path\n";
+ print "CApath = $capath\n";
print "cert = $certfile\n";
print "pid = $pidfile\n";
print "debug = $loglevel\n";