Ensure that stderr is caught / $prg=testssl.sh

As suggested in #2780 this PR redirects all stderr on a perl level
to stdout so that we should see all errors which we miss because
we can't redirect (>/dev/null in check) or we haven't redirected yet.

Also old checks are imporved, so that $prg is used as in newer
checks.
This commit is contained in:
Dirk Wetter
2025-05-27 10:54:25 +02:00
parent 75d8f8aa90
commit 1fb3a2224f
6 changed files with 16 additions and 15 deletions

View File

@ -31,14 +31,14 @@ $uri="google.com";
# unlink "tmp.json";
printf "\n%s\n", "Client simulations unit test via sockets --> $uri ...";
$socket_out = `./testssl.sh $check2run $uri 2>&1`;
$socket_out = `$prg $check2run $uri 2>&1`;
# $socket_json = json('tmp.json');
unlike($socket_out, qr/$socket_regex_bl/, "");
$tests++;
# unlink "tmp.json";
printf "\n%s\n", "Client simulations unit test via OpenSSL --> $uri ...";
$openssl_out = `./testssl.sh $check2run --ssl-native $uri 2>&1`;
$openssl_out = `$prg $check2run --ssl-native $uri 2>&1`;
# $openssl_json = json('tmp.json');
unlike($openssl_out, qr/$openssl_regex_bl/, "");
$tests++;
@ -48,7 +48,7 @@ $uri="smtp-relay.gmail.com:587";
# unlink "tmp.json";
printf "\n%s\n", "STARTTLS: Client simulations unit test via sockets --> $uri ...";
$socket_out = `./testssl.sh $check2run -t smtp $uri 2>&1`;
$socket_out = `$prg $check2run -t smtp $uri 2>&1`;
# $socket_json = json('tmp.json');
unlike($socket_out, qr/$socket_regex_bl/, "");
$tests++;