my $idnum = 1; # default 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
#***************************************************************************
$conffile = "$piddir/${proto}_stunnel.conf";
-$capath = abs_path($path);
$certfile = $stuncert ? "certs/$stuncert" : "certs/test-localhost.pem";
$certfile = abs_path($certfile);
$tstunnel_windows = 1;
# convert Cygwin/MinGW paths to Windows format
- $capath = pathhelp::sys_native_abs_path($capath);
$certfile = pathhelp::sys_native_abs_path($certfile);
}
$SIG{TERM} = \&exit_signal_handler;
# stunnel configuration file
if(open(my $stunconf, ">", "$conffile")) {
- print $stunconf "CApath = $capath\n";
print $stunconf "cert = $certfile\n";
print $stunconf "debug = $loglevel\n";
print $stunconf "socket = $socketopt\n";