Skip to content

Commit 2ae28d7

Browse files
committed
fix curves findings in TLS1.2 and prior versions
1 parent daf0671 commit 2ae28d7

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

testssl.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10852,6 +10852,14 @@ run_fs() {
1085210852
"${ossl_supported[i]}" && ! "${supported_curve[i]}" && curves_to_test+=":${curves_ossl[i]}"
1085310853
fi
1085410854
done
10855+
# Versions of TLS prior to 1.3 close the connection if the client does not support the curve
10856+
# used in the certificate. The easiest solution is to move the curves to the end of the list.
10857+
# instead of removing them from the ClientHello.
10858+
for (( i=low; i < high; i++ )); do
10859+
if ! "$HAS_TLS13" || ! "${curves_deprecated[i]}" || [[ "$proto" == "-no_tls1_3" ]]; then
10860+
"${supported_curve[i]}" && curves_to_test+=":${curves_ossl[i]}"
10861+
fi
10862+
done
1085510863
[[ -z "$curves_to_test" ]] && break
1085610864
$OPENSSL s_client $(s_client_options "$proto -cipher "\'${ecdhe_cipher_list:1}\'" -ciphersuites "\'${tls13_cipher_list:1}\'" -curves "${curves_to_test:1}" $STARTTLS $BUGS -connect $NODEIP:$PORT $PROXY $SNI") &>$TMPFILE </dev/null
1085710865
sclient_connect_successful $? $TMPFILE || break

0 commit comments

Comments
 (0)