gnutls-cli does not report failed handshake when debug level < 3
Description of problem:
gnutls-cli returns exit code 0 and does not report any error although the server side reports a failed handshake.
This behaviour changes when the debug level is set to 3 via
This is a regression probably introduced between 3.6.2 and 3.6.6.
Version of gnutls used:
Distributor of gnutls (e.g., Ubuntu, Fedora, RHEL)
Please see this issue: https://github.com/NixOS/nixpkgs/issues/84507 for details, which also links to runs with different versions of gnutls-cli that demonstrate the introduction of this regression and the workaround proposed here: https://github.com/NixOS/nixpkgs/pull/90718