Skip to content

Commit 3e465ba

Browse files
committed
feat: bump ssllabs rating guide to 2009r
1 parent cc5ab00 commit 3e465ba

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

testssl.sh

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2829,18 +2829,18 @@ run_hsts() {
28292829
if [[ $hsts_age_days -eq -1 ]]; then
28302830
pr_svrty_medium "misconfiguration: HSTS max-age (recommended > $HSTS_MIN seconds = $((HSTS_MIN/86400)) days ) is required but missing"
28312831
fileout "${jsonID}_time" "MEDIUM" "misconfiguration, parameter max-age (recommended > $HSTS_MIN seconds = $((HSTS_MIN/86400)) days) missing"
2832-
set_grade_cap "A" "HSTS max-age is misconfigured"
2832+
set_grade_warning "HSTS max-age is misconfigured"
28332833
elif [[ $hsts_age_sec -eq 0 ]]; then
28342834
pr_svrty_low "HSTS max-age is set to 0. HSTS is disabled"
28352835
fileout "${jsonID}_time" "LOW" "0. HSTS is disabled"
2836-
set_grade_cap "A" "HSTS is disabled"
2836+
set_grade_warning "HSTS is disabled"
28372837
elif [[ $hsts_age_sec -ge $HSTS_MIN ]]; then
28382838
pr_svrty_good "$hsts_age_days days" ; out "=$hsts_age_sec s"
28392839
fileout "${jsonID}_time" "OK" "$hsts_age_days days (=$hsts_age_sec seconds) > $HSTS_MIN seconds"
28402840
else
28412841
pr_svrty_medium "$hsts_age_sec s = $hsts_age_days days is too short ( >= $HSTS_MIN seconds recommended)"
28422842
fileout "${jsonID}_time" "MEDIUM" "max-age too short. $hsts_age_days days (=$hsts_age_sec seconds) < $HSTS_MIN seconds"
2843-
set_grade_cap "A" "HSTS max-age is too short"
2843+
set_grade_warning "HSTS max-age is too short"
28442844
fi
28452845
fi
28462846
if includeSubDomains "$TMPFILE"; then
@@ -2859,7 +2859,7 @@ run_hsts() {
28592859
else
28602860
pr_svrty_low "not offered"
28612861
fileout "$jsonID" "LOW" "not offered"
2862-
set_grade_cap "A" "HSTS is not offered"
2862+
set_grade_warning "HSTS is disabled"
28632863
fi
28642864
outln
28652865

@@ -6073,6 +6073,7 @@ run_protocols() {
60736073
fileout "$jsonID" "CRITICAL" "connection failed rather than downgrading to $latest_supported_string"
60746074
fi
60756075
add_proto_offered tls1_3 no
6076+
set_grade_warning "TLS 1.3 is not supported"
60766077
;;
60776078
2) if [[ "$DETECTED_TLS_VERSION" == 0300 ]]; then
60786079
detected_version_string="SSLv3"
@@ -6096,16 +6097,19 @@ run_protocols() {
60966097
fileout "$jsonID" "CRITICAL" "server responded with version number ${DETECTED_TLS_VERSION:0:2}.${DETECTED_TLS_VERSION:2:2}"
60976098
fi
60986099
add_proto_offered tls1_3 no
6100+
set_grade_warning "TLS 1.3 is not supported"
60996101
;;
61006102
3) out "not offered "
61016103
fileout "$jsonID" "INFO" "not offered"
61026104
add_proto_offered tls1_3 no
6105+
set_grade_warning "TLS 1.3 is not supported"
61036106
pr_warning "TLS downgraded to STARTTLS plaintext"; outln
61046107
fileout "$jsonID" "WARN" "TLS downgraded to STARTTLS plaintext"
61056108
;;
61066109
4) out "likely not offered, " # STARTTLS problem
61076110
fileout "$jsonID" "INFO" "likely not offered"
61086111
add_proto_offered tls1_3 no
6112+
set_grade_warning "TLS 1.3 is not supported"
61096113
pr_warning "received 4xx/5xx after STARTTLS handshake"; outln "$debug_recomm"
61106114
fileout "$jsonID" "WARN" "received 4xx/5xx after STARTTLS handshake${debug_recomm}"
61116115
;;
@@ -8124,6 +8128,7 @@ determine_cert_compression() {
81248128
tls_sockets "04" "$TLS13_CIPHER" "all+" "00,1b, 00,$len2, $len1$methods_to_test"
81258129
if [[ $? -ne 0 ]]; then
81268130
add_proto_offered tls1_3 no
8131+
set_grade_warning "TLS 1.3 is not supported"
81278132
return 1
81288133
fi
81298134
add_proto_offered tls1_3 yes
@@ -18549,8 +18554,6 @@ run_tls_fallback_scsv() {
1854918554
pr_svrty_medium "Downgrade attack prevention NOT supported"
1855018555
fileout "$jsonID" "MEDIUM" "NOT supported"
1855118556
fi
18552-
set_grade_cap "A" "Does not support TLS_FALLBACK_SCSV"
18553-
1855418557
elif grep -qa "alert inappropriate fallback" "$TMPFILE"; then
1855518558
pr_svrty_good "Downgrade attack prevention supported (OK)"
1855618559
fileout "$jsonID" "OK" "supported"
@@ -22561,6 +22564,7 @@ determine_optimal_sockets_params() {
2256122564
all_failed=false
2256222565
else
2256322566
add_proto_offered tls1_3 no
22567+
set_grade_warning "TLS 1.3 is not supported"
2256422568
KEY_SHARE_EXTN_NR="33"
2256522569
fi
2256622570
fi
@@ -23728,10 +23732,10 @@ run_rating() {
2372823732
# For other than SMTP on port 25 and port 587 and SIEVE (there's no implicit TLS port) you should use implicit TLS as per RFC 8314.
2372923733
# Instead of port 587 (STARTTLS) implicit TLS on port 465 should be considered.
2373023734

23731-
pr_bold " Rating specs"; out " (not complete) "; outln "SSL Labs's 'SSL Server Rating Guide' (version 2009q from 2020-01-30)"
23735+
pr_bold " Rating specs"; out " (not complete) "; outln "SSL Labs's 'SSL Server Rating Guide' (version 2009r from 2025-05-16)"
2373223736
pr_bold " Specification documentation "; pr_url "https://github.com/ssllabs/research/wiki/SSL-Server-Rating-Guide"
2373323737
outln
23734-
fileout "rating_spec" "INFO" "SSL Labs's 'SSL Server Rating Guide' (version 2009q from 2020-01-30)"
23738+
fileout "rating_spec" "INFO" "SSL Labs's 'SSL Server Rating Guide' (version 2009r from 2025-05-16)"
2373523739
fileout "rating_doc" "INFO" "https://github.com/ssllabs/research/wiki/SSL-Server-Rating-Guide"
2373623740

2373723741
# No point in calculating a score, if a cap of "F", "T", or "M" has been set

0 commit comments

Comments
 (0)