Skip to content

Commit 827782c

Browse files
authored
Merge pull request #2275 from drwetter/remove_negotiated
Remove Negotiated cipher / protocol in server preferences
2 parents 0dac50c + e918a2c commit 827782c

2 files changed

Lines changed: 1 addition & 77 deletions

File tree

t/baseline_data/default_testssl.csvfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@
6262
"cipherorder_TLSv1_3","testssl.sh/81.169.166.184","443","INFO","TLS_AES_256_GCM_SHA384 TLS_CHACHA20_POLY1305_SHA256 TLS_AES_128_GCM_SHA256","",""
6363
"prioritize_chacha_TLSv1_3","testssl.sh/81.169.166.184","443","INFO","false","",""
6464
"cipher_order","testssl.sh/81.169.166.184","443","OK","server","",""
65-
"protocol_negotiated","testssl.sh/81.169.166.184","443","OK","Default protocol TLS1.3","",""
66-
"cipher_negotiated","testssl.sh/81.169.166.184","443","OK","TLS_AES_256_GCM_SHA384, 253 bit ECDH (X25519)","",""
6765
"FS","testssl.sh/81.169.166.184","443","OK","offered","",""
6866
"FS_ciphers","testssl.sh/81.169.166.184","443","INFO","TLS_AES_256_GCM_SHA384 TLS_CHACHA20_POLY1305_SHA256 ECDHE-RSA-AES256-GCM-SHA384 ECDHE-RSA-AES256-SHA384 ECDHE-RSA-AES256-SHA DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA256 DHE-RSA-AES256-SHA DHE-RSA-CAMELLIA256-SHA TLS_AES_128_GCM_SHA256 ECDHE-RSA-AES128-GCM-SHA256 ECDHE-RSA-AES128-SHA DHE-RSA-AES128-GCM-SHA256 DHE-RSA-AES128-SHA256 DHE-RSA-AES128-SHA DHE-RSA-CAMELLIA128-SHA","",""
6967
"FS_ECDHE_curves","testssl.sh/81.169.166.184","443","OK","prime256v1 secp384r1 secp521r1 X25519 X448","",""

testssl.sh

Lines changed: 1 addition & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -6912,7 +6912,7 @@ run_server_preference() {
69126912
fi
69136913
elif ! "$has_cipher_order" && "$has_tls13_cipher_order"; then
69146914
case "$fileout_rating" in
6915-
"INFO")
6915+
"INFO")
69166916
out "only for TLS 1.3"
69176917
fileout "$jsonID" "INFO" "server -- < TLS 1.3 client determined"
69186918
;;
@@ -6962,80 +6962,6 @@ run_server_preference() {
69626962
fi
69636963
outln
69646964

6965-
pr_bold " Negotiated protocol "
6966-
jsonID="protocol_negotiated"
6967-
6968-
case "$default_proto" in
6969-
*TLSv1.3)
6970-
prln_svrty_best $default_proto
6971-
fileout "$jsonID" "OK" "Default protocol TLS1.3"
6972-
;;
6973-
*TLSv1.2)
6974-
prln_svrty_best $default_proto
6975-
fileout "$jsonID" "OK" "Default protocol TLS1.2"
6976-
;;
6977-
*TLSv1.1)
6978-
prln_svrty_low $default_proto
6979-
fileout "$jsonID" "LOW" "Default protocol TLS1.1"
6980-
;;
6981-
*TLSv1)
6982-
prln_svrty_low $default_proto
6983-
fileout "$jsonID" "LOW" "Default protocol TLS1.0"
6984-
;;
6985-
*SSLv2)
6986-
prln_svrty_critical $default_proto
6987-
fileout "$jsonID" "CRITICAL" "Default protocol SSLv2"
6988-
;;
6989-
*SSLv3)
6990-
prln_svrty_critical $default_proto
6991-
fileout "$jsonID" "CRITICAL" "Default protocol SSLv3"
6992-
;;
6993-
"")
6994-
pr_warning "default proto empty"
6995-
if [[ $OSSL_VER == 1.0.2* ]]; then
6996-
outln " (Hint: if IIS6 give OpenSSL 1.0.1 a try)"
6997-
fileout "$jsonID" "WARN" "Default protocol empty (Hint: if IIS6 give OpenSSL 1.0.1 a try)"
6998-
else
6999-
outln
7000-
fileout "$jsonID" "WARN" "Default protocol empty"
7001-
fi
7002-
ret=1
7003-
;;
7004-
*)
7005-
pr_warning "FIXME line $LINENO: $default_proto"
7006-
fileout "$jsonID" "WARN" "FIXME line $LINENO: $default_proto"
7007-
ret=1
7008-
;;
7009-
esac
7010-
7011-
pr_bold " Negotiated cipher "
7012-
jsonID="cipher_negotiated"
7013-
pr_cipher_quality "$default_cipher"
7014-
case $? in
7015-
1) fileout "$jsonID" "CRITICAL" "$default_cipher$(read_dhbits_from_file "$TEMPDIR/$NODEIP.run_server_preference.txt" "string") $limitedsense"
7016-
;;
7017-
2) fileout "$jsonID" "HIGH" "$default_cipher$(read_dhbits_from_file "$TEMPDIR/$NODEIP.run_server_preference.txt" "string") $limitedsense"
7018-
;;
7019-
3) fileout "$jsonID" "MEDIUM" "$default_cipher$(read_dhbits_from_file "$TEMPDIR/$NODEIP.run_server_preference.txt" "string") $limitedsense"
7020-
;;
7021-
6|7) fileout "$jsonID" "OK" "$default_cipher$(read_dhbits_from_file "$TEMPDIR/$NODEIP.run_server_preference.txt" "string") $limitedsense"
7022-
;; # best ones
7023-
4) fileout "$jsonID" "LOW" "$default_cipher$(read_dhbits_from_file "$TEMPDIR/$NODEIP.run_server_preference.txt" "string") (cbc) $limitedsense"
7024-
;; # it's CBC. --> lucky13
7025-
0) pr_warning "default cipher empty" ;
7026-
if [[ $OSSL_VER == 1.0.2* ]]; then
7027-
out " (Hint: if IIS6 give OpenSSL 1.0.1 a try)"
7028-
fileout "$jsonID" "WARN" "Default cipher empty (if IIS6 give OpenSSL 1.0.1 a try) $limitedsense"
7029-
else
7030-
fileout "$jsonID" "WARN" "Default cipher empty $limitedsense"
7031-
fi
7032-
ret=1
7033-
;;
7034-
*) fileout "$jsonID" "INFO" "$default_cipher$(read_dhbits_from_file "$TEMPDIR/$NODEIP.run_server_preference.txt" "string") $limitedsense"
7035-
;;
7036-
esac
7037-
[[ -n "$default_cipher" ]] && read_dhbits_from_file "$TEMPDIR/$NODEIP.run_server_preference.txt"
7038-
70396965
if [[ "$cipher0" != $cipher1 ]]; then
70406966
pr_warning " -- inconclusive test, matching cipher in list missing"
70416967
outln ", better see above"

0 commit comments

Comments
 (0)