mirror of
https://github.com/drwetter/testssl.sh.git
synced 2024-12-29 04:49:44 +01:00
Fix #2599
This commit fixes #2599 by not wrapping fileout() messages in a "clientProblem" wrapper if TLS13_ONLY is set. The TLS13_ONLY flag being set is an indicator that fileout_banner() has already been called.
This commit is contained in:
parent
65c463fcbf
commit
26a3a8fd51
@ -1371,13 +1371,17 @@ fileout_insert_warning() {
|
|||||||
[[ "$CMDLINE=" =~ -iL ]] && return 0
|
[[ "$CMDLINE=" =~ -iL ]] && return 0
|
||||||
# Note we still have the message on screen + in HTML which is not as optimal as it could be
|
# Note we still have the message on screen + in HTML which is not as optimal as it could be
|
||||||
|
|
||||||
if "$do_pretty_json" && "$JSONHEADER"; then
|
# See #2599. The "clientProblem" wrapper should only be added if fileout_insert_warning()
|
||||||
|
# is called before fileout_banner(). The only instance in which this function is called
|
||||||
|
# after fileout_banner() is in the case of a TLS 1.3 only server when $OPENSSL does not
|
||||||
|
# support TLS 1.3.
|
||||||
|
if "$do_pretty_json" && "$JSONHEADER" && ! "$TLS13_ONLY"; then
|
||||||
echo -e " \"clientProblem${CLIENT_PROB_NO}\" : [" >>"$JSONFILE"
|
echo -e " \"clientProblem${CLIENT_PROB_NO}\" : [" >>"$JSONFILE"
|
||||||
CLIENT_PROB_NO=$((CLIENT_PROB_NO + 1))
|
CLIENT_PROB_NO=$((CLIENT_PROB_NO + 1))
|
||||||
FIRST_FINDING=true # make sure we don't have a comma here
|
FIRST_FINDING=true # make sure we don't have a comma here
|
||||||
fi
|
fi
|
||||||
fileout "$1" "$2" "$3"
|
fileout "$1" "$2" "$3"
|
||||||
if "$do_pretty_json"; then
|
if "$do_pretty_json" && ! "$TLS13_ONLY"; then
|
||||||
if "$JSONHEADER"; then
|
if "$JSONHEADER"; then
|
||||||
echo -e "\n ]," >>"$JSONFILE"
|
echo -e "\n ]," >>"$JSONFILE"
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user