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 13:00:43 +0000 (15:00 +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)
(cherry picked from commit 46d5e2b42e00ec392bf3326743519bc25136db09)

util/TLSProxy/Proxy.pm

index d025075b5ad743382c97496ee07a86a56f220f27..bdb2cd8b5c17f4e740d9295c0511634a15181f4a 100644 (file)
@@ -159,6 +159,9 @@ sub start
         if ($self->serverflags ne "") {
             $execcmd .= " ".$self->serverflags;
         }
+        if ($self->debug) {
+            print STDERR "Server command: $execcmd\n";
+        }
         exec($execcmd);
     }
     $self->serverpid($pid);
@@ -217,6 +220,9 @@ sub clientstart
             if ($self->clientflags ne "") {
                 $execcmd .= " ".$self->clientflags;
             }
+            if ($self->debug) {
+                print STDERR "Client command: $execcmd\n";
+            }
             exec($execcmd);
         }
     }