Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add TLS1.3 support #169

wants to merge 2 commits into from

Conversation

jvehent
Copy link
Contributor

@jvehent jvehent commented Dec 12, 2018

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.

@@ -31,6 +31,7 @@ else
case "$(uname -s)" in
Darwin)
opensslbin_name="openssl-darwin64"
openssl_legacy_bin_name="openssl-darwin64"
Copy link
Member

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?

Copy link
Contributor Author

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.

@jvehent
Copy link
Contributor Author

jvehent commented Dec 14, 2018

Any objection to merge this? (other than travisci being stupid)

@tomato42
Copy link
Member

I haven't really gone through this, I should have some time to do it this weekend

Copy link
Member

@tomato42 tomato42 left a 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
Copy link
Member

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]%%,}"
Copy link
Member

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
Copy link
Member

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"
Copy link
Member

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

@tomato42
Copy link
Member

oh, and maybe try to rebase on top of master?

ap-wtioit added a commit to ap-wtioit/cipherscan that referenced this pull request Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants