Skip to content

Commit 2ca5311

Browse files
authored
Merge pull request #2190 from EliteTK/3.0-fix-crime-tls1.3
Fix CRIME test on servers only supporting TLS 1.3
2 parents 897443f + 5793bc2 commit 2ca5311

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

testssl.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14661,6 +14661,7 @@ run_crime() {
1466114661

1466214662
[[ $VULN_COUNT -le $VULN_THRESHLD ]] && outln && pr_headlineln " Testing for CRIME vulnerability " && outln
1466314663
pr_bold " CRIME, TLS " ; out "($cve) "
14664+
jsonID="CRIME_TLS"
1466414665

1466514666
if "$TLS13_ONLY"; then
1466614667
pr_svrty_best "not vulnerable (OK)"
@@ -14673,7 +14674,7 @@ run_crime() {
1467314674
if ! "$HAS_ZLIB"; then
1467414675
if "$SSL_NATIVE"; then
1467514676
prln_local_problem "$OPENSSL lacks zlib support"
14676-
fileout "CRIME_TLS" "WARN" "CRIME, TLS: Not tested. $OPENSSL lacks zlib support" "$cve" "$cwe"
14677+
fileout "$jsonID" "WARN" "CRIME, TLS: Not tested. $OPENSSL lacks zlib support" "$cve" "$cwe"
1467714678
return 1
1467814679
else
1467914680
tls_sockets "03" "$TLS12_CIPHER" "" "" "true"
@@ -14691,23 +14692,23 @@ run_crime() {
1469114692

1469214693
if [[ $sclient_success -ne 0 ]]; then
1469314694
pr_warning "test failed (couldn't connect)"
14694-
fileout "CRIME_TLS" "WARN" "Check failed, couldn't connect" "$cve" "$cwe"
14695+
fileout "$jsonID" "WARN" "Check failed, couldn't connect" "$cve" "$cwe"
1469514696
ret=1
1469614697
elif grep -a Compression $TMPFILE | grep -aq NONE >/dev/null; then
1469714698
pr_svrty_good "not vulnerable (OK)"
1469814699
if [[ $SERVICE != HTTP ]] && ! "$CLIENT_AUTH"; then
1469914700
out " (not using HTTP anyway)"
14700-
fileout "CRIME_TLS" "OK" "not vulnerable (not using HTTP anyway)" "$cve" "$cwe"
14701+
fileout "$jsonID" "OK" "not vulnerable (not using HTTP anyway)" "$cve" "$cwe"
1470114702
else
14702-
fileout "CRIME_TLS" "OK" "not vulnerable" "$cve" "$cwe"
14703+
fileout "$jsonID" "OK" "not vulnerable" "$cve" "$cwe"
1470314704
fi
1470414705
else
1470514706
if [[ $SERVICE == HTTP ]] || "$CLIENT_AUTH"; then
1470614707
pr_svrty_high "VULNERABLE (NOT ok)"
14707-
fileout "CRIME_TLS" "HIGH" "VULNERABLE" "$cve" "$cwe" "$hint"
14708+
fileout "$jsonID" "HIGH" "VULNERABLE" "$cve" "$cwe" "$hint"
1470814709
else
1470914710
pr_svrty_medium "VULNERABLE but not using HTTP: probably no exploit known"
14710-
fileout "CRIME_TLS" "MEDIUM" "VULNERABLE, but not using HTTP. Probably no exploit known" "$cve" "$cwe" "$hint"
14711+
fileout "$jsonID" "MEDIUM" "VULNERABLE, but not using HTTP. Probably no exploit known" "$cve" "$cwe" "$hint"
1471114712
# not clear whether a protocol != HTTP offers the ability to repeatedly modify the input
1471214713
# which is done e.g. via javascript in the context of HTTP
1471314714
fi

0 commit comments

Comments
 (0)