-
-
Notifications
You must be signed in to change notification settings - Fork 16.2k
Fix SSL session resumption with ClientAuth.OPTIONAL and add tests with session tickets #14404
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
6afcc70
SSLEngineTest should parameterize over session ticket enablement
chrisvest 7eb599c
Support OPTIONAL SSL in the ResumptionController
chrisvest bc04cbf
Checkstyle fixes
chrisvest e06c9c9
SSLEngineTest fixes
chrisvest 4ce9964
Trace where executor shutdown occurred
chrisvest 4ac853c
Only test tickets with BoringSSL
chrisvest 1871be4
Revert "Trace where executor shutdown occurred"
chrisvest c31c29e
Add comments on the ClientAuth.OPTIONAL handling
chrisvest File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Support OPTIONAL SSL in the ResumptionController
Motivation: If TLS is `OPTIONAL` then there won't always be a verified peer. This means there will be no calls on the server `TrustManager` to check if the client is trusted. That makes it look like a resumed session to the resumption controller. But there won't be any verified peer on the session, and trying to get the peer certificates will throw an exception. Modification: - Make the `ResumptionController` consider if the engine is in client mode, or if it requires client authentication, and only propagate `SSLPeerUnverifiedException` if so. - Make the `ResumptionController` swallow the `SSLPeerUnverifiedException` when client auth is OPTIONAL or NONE. - Add a test for this scenario. Result: The `ResumableX509ExtendedTrustManager` interface can now be used together with `ClientAuth.OPTIONAL`.
- Loading branch information
commit 7eb599ce048186c822249ea114a91bb8d489c561
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
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.
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.
can you add a comment clarifying the goal of this conditional?
getUseClientMode
-> I assume this is to cover the case of "always do this on the client"getNeedClientAuth || getWantClientAuth
-> isn't the default treated by some engines as "want"? for example iirc openssl flavors will have the server request the client's certificate but if they don't return one it will succeed. so I'm just trying to understand if client/server need to be consistent and if not, why.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.
@Scottmitch I've added comments explaining the logic. Please take a look.