Skip to content

Commit 5562088

Browse files
committed
Merge remote-tracking branch 'origin/3.0' into digrc_3.0
2 parents ac2b431 + a52b3b8 commit 5562088

2 files changed

Lines changed: 19 additions & 7 deletions

File tree

t/08_isHTML_valid.t

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use strict;
77
use Test::More;
88
use Data::Dumper;
9+
use Text::Diff;
910

1011
my $tests = 0;
1112
my $prg="./testssl.sh";
@@ -15,6 +16,7 @@ my $html="";
1516
my $debughtml="";
1617
my $edited_html="";
1718
my $check2run="--ip=one --color 0 --htmlfile tmp.html";
19+
my $diff="";
1820

1921
die "Unable to open $prg" unless -f $prg;
2022

@@ -72,5 +74,8 @@ $debughtml =~ s/.*DEBUG:.*\n//g;
7274
cmp_ok($debughtml, "eq", $html, "HTML file created with --debug 4 matches HTML file created without --debug");
7375
$tests++;
7476

77+
$diff = diff \$debughtml, \$html;
78+
printf "\n%s\n", "$diff";
79+
7580
printf "\n";
7681
done_testing($tests);

testssl.sh

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,9 @@ pr_bold() { tm_bold "$1"; [[ "$COLOR" -ne 0 ]] && html_out "<span style=\"
599599
prln_bold() { pr_bold "$1" ; outln; }
600600

601601
NO_ITALICS=false
602-
if [[ $SYSTEM == OpenBSD ]]; then
602+
if [[ $TERM == screen ]]; then
603+
NO_ITALICS=true
604+
elif [[ $SYSTEM == OpenBSD ]]; then
603605
NO_ITALICS=true
604606
elif [[ $SYSTEM == FreeBSD ]]; then
605607
if [[ ${SYSTEMREV%\.*} -le 9 ]]; then
@@ -867,7 +869,7 @@ fileout_pretty_json_banner() {
867869

868870
echo -e " \"Invocation\" : \"$PROG_NAME $CMDLINE\",
869871
\"at\" : \"$HNAME:$OPENSSL_LOCATION\",
870-
\"version\" : \"$VERSION ${GIT_REL_SHORT:-$CVS_REL_SHORT} from $REL_DATE\",
872+
\"version\" : \"$VERSION ${GIT_REL_SHORT} from $REL_DATE\",
871873
\"openssl\" : \"$OSSL_NAME $OSSL_VER from $OSSL_BUILD_DATE\",
872874
\"startTime\" : \"$START_TIME\",
873875
\"scanResult\" : ["
@@ -1097,7 +1099,7 @@ html_banner() {
10971099
if "$CHILD_MASS_TESTING" && "$HTMLHEADER"; then
10981100
html_out "## Scan started as: \"$PROG_NAME $CMDLINE\"\n"
10991101
html_out "## at $HNAME:$OPENSSL_LOCATION\n"
1100-
html_out "## version testssl: $VERSION ${GIT_REL_SHORT:-$CVS_REL_SHORT} from $REL_DATE\n"
1102+
html_out "## version testssl: $VERSION ${GIT_REL_SHORT} from $REL_DATE\n"
11011103
html_out "## version openssl: \"$OSSL_NAME $OSSL_VER\" from \"$OSSL_BUILD_DATE\")\n\n"
11021104
fi
11031105
}
@@ -1141,7 +1143,7 @@ prepare_logging() {
11411143
fi
11421144
tmln_out "## Scan started as: \"$PROG_NAME $CMDLINE\"" >>"$LOGFILE"
11431145
tmln_out "## at $HNAME:$OPENSSL_LOCATION" >>"$LOGFILE"
1144-
tmln_out "## version testssl: $VERSION ${GIT_REL_SHORT:-$CVS_REL_SHORT} from $REL_DATE" >>"$LOGFILE"
1146+
tmln_out "## version testssl: $VERSION ${GIT_REL_SHORT} from $REL_DATE" >>"$LOGFILE"
11451147
tmln_out "## version openssl: \"$OSSL_VER\" from \"$OSSL_BUILD_DATE\")\n" >>"$LOGFILE"
11461148
exec > >(tee -a -i "$LOGFILE")
11471149
}
@@ -17508,9 +17510,7 @@ mybanner() {
1750817510
"$QUIET" && return
1750917511
"$CHILD_MASS_TESTING" && return
1751017512
OPENSSL_NR_CIPHERS=$(count_ciphers "$(actually_supported_osslciphers 'ALL:COMPLEMENTOFALL:@STRENGTH' 'ALL')")
17511-
[[ -z "$GIT_REL" ]] && \
17512-
idtag="$CVS_REL" || \
17513-
idtag="$GIT_REL -- $CVS_REL_SHORT"
17513+
[[ -n "$GIT_REL" ]] && idtag="$GIT_REL"
1751417514
bb1=$(cat <<EOF
1751517515

1751617516
###########################################################
@@ -19540,6 +19540,13 @@ parse_cmd_line() {
1954019540
do_client_simulation=true
1954119541
;;
1954219542
-U|--vulnerable|--vulnerabilities)
19543+
# Lookahead function: If the order of the cmdline is '-U --ids-friendly'
19544+
# then we need to make sure we catch --ids-friendly. Normally we do not,
19545+
# see #1717. The following statement makes sure. In the do-while + case-esac
19546+
# loop it will be execute again, but it does not hurt
19547+
if [[ "${CMDLINE_ARRAY[@]}" =~ --ids-friendly ]]; then
19548+
OFFENSIVE=false
19549+
fi
1954319550
do_vulnerabilities=true
1954419551
do_heartbleed="$OFFENSIVE"
1954519552
do_ccs_injection="$OFFENSIVE"

0 commit comments

Comments
 (0)