secureserver.pl: clean up formatting of config and fix verbose output
Verbose output was not matching the actual configuration file, because FIPS and Windows conditions were ignored.
This commit is contained in:
parent
6a76d3eb53
commit
e96d7f1df4
@ -269,26 +269,24 @@ if($stunnel_version >= 400) {
|
|||||||
$SIG{TERM} = \&exit_signal_handler;
|
$SIG{TERM} = \&exit_signal_handler;
|
||||||
# stunnel configuration file
|
# stunnel configuration file
|
||||||
if(open(STUNCONF, ">$conffile")) {
|
if(open(STUNCONF, ">$conffile")) {
|
||||||
print STUNCONF "
|
print STUNCONF "CApath = $capath\n";
|
||||||
CApath = $capath
|
print STUNCONF "cert = $certfile\n";
|
||||||
cert = $certfile
|
print STUNCONF "debug = $loglevel\n";
|
||||||
debug = $loglevel
|
print STUNCONF "socket = $socketopt\n";
|
||||||
socket = $socketopt";
|
|
||||||
if($fips_support) {
|
if($fips_support) {
|
||||||
# disable fips in case OpenSSL doesn't support it
|
# disable fips in case OpenSSL doesn't support it
|
||||||
print STUNCONF "
|
print STUNCONF "fips = no\n";
|
||||||
fips = no";
|
|
||||||
}
|
}
|
||||||
if(!$tstunnel_windows) {
|
if(!$tstunnel_windows) {
|
||||||
print STUNCONF "
|
# do not use Linux-specific options on Windows
|
||||||
output = $logfile
|
print STUNCONF "output = $logfile\n";
|
||||||
pid = $pidfile
|
print STUNCONF "pid = $pidfile\n";
|
||||||
foreground = yes";
|
print STUNCONF "foreground = yes\n";
|
||||||
}
|
}
|
||||||
print STUNCONF "
|
print STUNCONF "\n";
|
||||||
[curltest]
|
print STUNCONF "[curltest]\n";
|
||||||
accept = $accept_port
|
print STUNCONF "accept = $accept_port\n";
|
||||||
connect = $target_port";
|
print STUNCONF "connect = $target_port\n";
|
||||||
if(!close(STUNCONF)) {
|
if(!close(STUNCONF)) {
|
||||||
print "$ssltext Error closing file $conffile\n";
|
print "$ssltext Error closing file $conffile\n";
|
||||||
exit 1;
|
exit 1;
|
||||||
@ -303,11 +301,16 @@ if($stunnel_version >= 400) {
|
|||||||
print "cmd: $cmd\n";
|
print "cmd: $cmd\n";
|
||||||
print "CApath = $capath\n";
|
print "CApath = $capath\n";
|
||||||
print "cert = $certfile\n";
|
print "cert = $certfile\n";
|
||||||
print "pid = $pidfile\n";
|
|
||||||
print "debug = $loglevel\n";
|
print "debug = $loglevel\n";
|
||||||
print "socket = $socketopt\n";
|
print "socket = $socketopt\n";
|
||||||
print "output = $logfile\n";
|
if($fips_support) {
|
||||||
print "foreground = yes\n";
|
print "fips = no\n";
|
||||||
|
}
|
||||||
|
if(!$tstunnel_windows) {
|
||||||
|
print "pid = $pidfile\n";
|
||||||
|
print "output = $logfile\n";
|
||||||
|
print "foreground = yes\n";
|
||||||
|
}
|
||||||
print "\n";
|
print "\n";
|
||||||
print "[curltest]\n";
|
print "[curltest]\n";
|
||||||
print "accept = $accept_port\n";
|
print "accept = $accept_port\n";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user