-
Notifications
You must be signed in to change notification settings - Fork 121
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
Refactor TLS 1.3 cipher selection and fix SSL_get_ciphers #2092
Open
smittals2
wants to merge
39
commits into
aws:main
Choose a base branch
from
smittals2:get_ciphers
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
smittals2
changed the title
[DRAFT] Fix SSL_get_ciphers behavior to return TLS 1.3 ciphersuites
Fix SSL_get_ciphers behavior to return TLS 1.3 ciphersuites
Jan 2, 2025
justsmth
previously approved these changes
Jan 6, 2025
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2092 +/- ##
==========================================
+ Coverage 78.96% 78.99% +0.02%
==========================================
Files 611 611
Lines 105514 105603 +89
Branches 14941 14958 +17
==========================================
+ Hits 83319 83420 +101
+ Misses 21543 21531 -12
Partials 652 652 ☔ View full report in Codecov by Sentry. |
andrewhop
reviewed
Jan 7, 2025
justsmth
reviewed
Jan 14, 2025
smittals2
changed the title
Fix SSL_get_ciphers behavior to return TLS 1.3 ciphersuites
Refactor TLS 1.3 cipher selection and fix SSL_get_ciphers
Jan 23, 2025
andrewhop
reviewed
Jan 24, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issues:
CryptoAlg-2559
Description of changes:
SSL_CTX_new
now configuresctx->tls13_cipher_suites
with default TLS 1.3 ciphers (did not previously). The default preference order for TLS 1.3 ciphersuites differs based on whether AES Hardware acceleration is enabled in AWS-LC, we match this behavior in SSL_CTX_new.SSL_CONFIG
object holds it's own TLS 1.3 ciphersuites nowSSL_CONFIG
SSL_CTX
orSSL_CONFIG
, the maincipher_list
is updated with values from its owntls13_cipher_suites
via a new functionupdate_cipher_list
. This function also updatesin_group_flags
accordingly. This means, TLS 1.3 ciphersuites are stored seperately while the maincipher_list
var holds ALL ciphersuites in both objectsCall-outs:
Note
SSL_CTX
generally has a longer lifetime than anSSL
object.SSL_CONFIG
objects live onSSL
objects. BothSSL_CTX
andSSL_CONFIG
have their owncipher_list
andtls13_cipher_list
fields. We supportSSL_[CTX]_set_...
APIs to set these fields.In general, our TLS implementations pick cipher suites against the given connection constraints/parameters. Adding TLS 1.3 ciphersuites to
ctx->cipher_list
orconfig->cipher_list
does not modify this behavior or introduce new problems.Testing:
Added new testing to validate cipher selection behavior between SSL_CTX and SSL_CONFIG objects
Added change detection test for TLS 1.3 Client Hello
Updated old tests and to-do's regarding TLS 1.3
Testing to ensure
SSL_get_ciphers
returns ALL ciphersuites instead of TLS 1.2 and below.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.