Skip to content

Commit b4274e8

Browse files
authored
Merge pull request #2603 from dcooper16/fix2599_30
Fix #2599
2 parents 6570c20 + 06c28bd commit b4274e8

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

testssl.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -936,13 +936,17 @@ fileout_insert_warning() {
936936
[[ "$CMDLINE=" =~ -iL ]] && return 0
937937
# Note we still have the message on screen + in HTML which is not as optimal as it could be
938938

939-
if "$do_pretty_json" && "$JSONHEADER"; then
939+
# See #2599. The "clientProblem" wrapper should only be added if fileout_insert_warning()
940+
# is called before fileout_banner(). The only instance in which this function is called
941+
# after fileout_banner() is in the case of a TLS 1.3 only server when $OPENSSL does not
942+
# support TLS 1.3.
943+
if "$do_pretty_json" && "$JSONHEADER" && ! "$TLS13_ONLY"; then
940944
echo -e " \"clientProblem${CLIENT_PROB_NO}\" : [" >>"$JSONFILE"
941945
CLIENT_PROB_NO=$((CLIENT_PROB_NO + 1))
942946
FIRST_FINDING=true # make sure we don't have a comma here
943947
fi
944948
fileout "$1" "$2" "$3"
945-
if "$do_pretty_json"; then
949+
if "$do_pretty_json" && ! "$TLS13_ONLY"; then
946950
if "$JSONHEADER"; then
947951
echo -e "\n ]," >>"$JSONFILE"
948952
else

0 commit comments

Comments
 (0)