aboutsummaryrefslogtreecommitdiffstats
path: root/util/TLSProxy
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2016-02-17 22:04:54 +0100
committerRichard Levitte <levitte@openssl.org>2016-02-17 22:11:55 +0100
commitf9c693df45dc9948299c8c7ef02aa7648735bc4a (patch)
tree5431cfd15ce35e859e57dc828bc4c9522a8d083d /util/TLSProxy
parent02f7114a7fbb3f3ac171bae87be8c13bc69e4005 (diff)
downloadopenssl-f9c693df45dc9948299c8c7ef02aa7648735bc4a.tar.gz
Be more verbose when debugging is on
It's near impossible to figure out what goes wrong with the execution of sub-commands otherwise. Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'util/TLSProxy')
-rw-r--r--util/TLSProxy/Proxy.pm16
1 files changed, 10 insertions, 6 deletions
diff --git a/util/TLSProxy/Proxy.pm b/util/TLSProxy/Proxy.pm
index 9883901b94..7d21f4e83d 100644
--- a/util/TLSProxy/Proxy.pm
+++ b/util/TLSProxy/Proxy.pm
@@ -178,9 +178,11 @@ sub start
$pid = fork();
if ($pid == 0) {
- open(STDOUT, ">", File::Spec->devnull())
- or die "Failed to redirect stdout: $!";
- open(STDERR, ">&STDOUT");
+ if (!$self->debug) {
+ open(STDOUT, ">", File::Spec->devnull())
+ or die "Failed to redirect stdout: $!";
+ open(STDERR, ">&STDOUT");
+ }
my $execcmd = $self->execute
." s_server -no_comp -rev -engine ossltest -accept "
.($self->server_port)
@@ -227,9 +229,11 @@ sub clientstart
if ($self->execute) {
my $pid = fork();
if ($pid == 0) {
- open(STDOUT, ">", File::Spec->devnull())
- or die "Failed to redirect stdout: $!";
- open(STDERR, ">&STDOUT");
+ if (!$self->debug) {
+ open(STDOUT, ">", File::Spec->devnull())
+ or die "Failed to redirect stdout: $!";
+ open(STDERR, ">&STDOUT");
+ }
my $execcmd = "echo test | ".$self->execute
." s_client -engine ossltest -connect "
.($self->proxy_addr).":".($self->proxy_port);