Skip to content

Commit

Permalink
fix curves findings in TLS1.2 and prior versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Odinmylord committed Jan 17, 2025
1 parent daf0671 commit 2ae28d7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions testssl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10852,6 +10852,14 @@ run_fs() {
"${ossl_supported[i]}" && ! "${supported_curve[i]}" && curves_to_test+=":${curves_ossl[i]}"
fi
done
# Versions of TLS prior to 1.3 close the connection if the client does not support the curve
# used in the certificate. The easiest solution is to move the curves to the end of the list.
# instead of removing them from the ClientHello.
for (( i=low; i < high; i++ )); do
if ! "$HAS_TLS13" || ! "${curves_deprecated[i]}" || [[ "$proto" == "-no_tls1_3" ]]; then
"${supported_curve[i]}" && curves_to_test+=":${curves_ossl[i]}"
fi
done
[[ -z "$curves_to_test" ]] && break
$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
sclient_connect_successful $? $TMPFILE || break
Expand Down

0 comments on commit 2ae28d7

Please sign in to comment.