-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add TLS1.3 support #169
base: master
Are you sure you want to change the base?
Add TLS1.3 support #169
Conversation
@@ -31,6 +31,7 @@ else | |||
case "$(uname -s)" in | |||
Darwin) | |||
opensslbin_name="openssl-darwin64" | |||
openssl_legacy_bin_name="openssl-darwin64" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's the same file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, until I build a recent openssl for darwin.
Any objection to merge this? (other than travisci being stupid) |
I haven't really gone through this, I should have some time to do it this weekend |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry for the delay, I should be able to reply promptly to any following changes/comments
in general it's OK, but as I've said before we still have the problem with different ciphers supported by different version of OpenSSL
@@ -126,6 +128,16 @@ SHORTCIPHERSUITE=( | |||
join_array_by_char ':' "${SHORTCIPHERSUITE[@]}" | |||
SHORTCIPHERSUITESTRING="$joined_array" | |||
|
|||
# TLS 1.3 is different from other versions of the protocol and | |||
# ciphersuites must be passed to openssl explicitely |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: explicitly
if [[ $line =~ New,\ ]]; then | ||
local match=($line) | ||
current_protocol="${match[1]%%,}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't older versions print SSL3/TLS1 here?
@@ -447,7 +478,7 @@ parse_openssl_output() { | |||
fi | |||
|
|||
# extract used protocol | |||
if [[ $line =~ ^Protocol\ + ]]; then | |||
if [[ $line =~ Protocol\ + ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the drop of ^
?
@@ -1439,8 +1550,8 @@ test_tls_tolerance() { | |||
# v2, small but with TLS1.1 as max version | |||
# | |||
ratelimit | |||
verbose "Testing fallback with ${sslcommand[*]} -no_tls1_2" | |||
local tmp=$(echo Q | "${sslcommand[@]}" -no_tls1_2 2>/dev/null) | |||
verbose "Testing fallback with ${sslcommand[*]} -no_tls1_3 -no_tls1_2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we are adding that unconditionally, then we need to check for version of OpenSSL (if provided by user) and abort if it's not 1.1.1
oh, and maybe try to rebase on top of master? |
I finally decided to take the easiest possible route and create a new openssl binary based off 1.1.1, and rename the previous binary as legacy. This will allow us to keep support for old ciphers/protocols and track the latest features at the same time.
Since TLS1.3 is fairly different from previous versions, I created a separate function to scan for it. We can't use the usual "discard previous used cipher" algorithm with it, as OpenSSL doesn't support the
!
flag in the-ciphersuites
parameter, but the logic isn't that different otherwise.The refactoring caused a few issues that I think are now all fixed, but we should still test heavily before merging this patch.