TLSProxy: When in debug mode, show the exact subprocess commands
authorRichard Levitte <levitte@openssl.org>
Fri, 28 Apr 2017 07:20:05 +0000 (09:20 +0200)
committerRichard Levitte <levitte@openssl.org>
Fri, 28 Apr 2017 07:20:05 +0000 (09:20 +0200)
When you want to debug a test that goes wrong, it's useful to know
exactly what subprocess commands are run.

Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3342)

util/TLSProxy/Proxy.pm

index aaef753cd60ad5ae6edc94aefa8ba5a4c193a6fe..a826cb525741e05573a1e1d0ea62a6c969bff836 100644 (file)
@@ -171,6 +171,9 @@ sub start
         if ($self->serverflags ne "") {
             $execcmd .= " ".$self->serverflags;
         }
+        if ($self->debug) {
+            print STDERR "Server command: $execcmd\n";
+        }
         exec($execcmd);
     }
     $self->serverpid($pid);
@@ -232,6 +235,9 @@ sub clientstart
             if (defined $self->sessionfile) {
                 $execcmd .= " -ign_eof";
             }
+            if ($self->debug) {
+                print STDERR "Client command: $execcmd\n";
+            }
             exec($execcmd);
         }
     }